Can't debug in QT creator with cmake project

淺唱寂寞╮ 提交于 2020-01-12 18:36:30

问题


I created a new Plain C++ Project with CMake Build. When I set a breakpoint and press the Debug Button I get this message:

This does not seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.

Section .debug_info: Not found.
Section .debug_abbrev: Not found.
Section .debug_line: Not found.
Section .debug_str: Not found.
Section .debug_loc: Not found.
Section .debug_range: Not found.
Section .gdb_index: Not found.
Section .note.gnu.build-id: Found.
Section .gnu.hash: Found.
Section .gnu_debuglink: Not found.

回答1:


You can add this CMake argument to your Build Settings:

-DCMAKE_BUILD_TYPE=Debug



来源:https://stackoverflow.com/questions/32560862/cant-debug-in-qt-creator-with-cmake-project

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!