c++ - Enable debug symbols for CMAKE in VS2017 -


visual studio 2017 supports built-in cmake features, don't need work solution or project files anymore.

when tried build , debug executable program, output window said:

module built without symbols. 

i couldn't set breakpoints in code. debug flags set cmake:

message(status ${cmake_cxx_flags_debug}) /mdd /zi /ob0 /od /rtc1 

how can add debug symbols in vs2017.2 (the version uses cmake 3.7.2)?

edit: settings x86-debug:

{     "name": "x86-debug",     "generator": "visual studio 15 2017",     "configurationtype": "debug",     "buildroot": "${env.localappdata}\\cmakebuild\\${workspacehash}\\build\\${name}",     "cmakecommandargs": "",     "buildcommandargs": "-m -v:minimal",     "ctestcommandargs": "",     "variables": [         {             "name": "build_shared_libs",             "value": "off"         }     ] } 

right click project, properties->configuration properties->linker->debugging->generate debug info.

please check whether blank. can set "optimize debugging (/debug)", , recompile project, debug again.


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -