我用CMake Build创建了一个新的Plain C++项目.当我设置断点并按下调试按钮时,我收到以下消息:
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.
Run Code Online (Sandbox Code Playgroud)
您可以将此CMake参数添加到构建设置:
-DCMAKE_BUILD_TYPE=Debug
Run Code Online (Sandbox Code Playgroud)