版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010590568/article/details/84820522
最近在Qt Creator里调试代码,发现比Clion也更人性化。特别是在编辑和调试上。但是偶尔也会出现一些小问题。
一、cmake管理的项目,每次点击开始调试就会弹出一个弹出Unknow error!
处理的方法就是删除项目下的CMakeLists.txt.user 文件。然后把项目重新打开,选择CMake Project File项目,选择CMakeLists.txt。然后点击Configuration生成项目。
二、Qt里调试出现下面报错的时候
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.
这个弹窗错误是因为选择在release下调试,设置成Debug即可!
也可以在CMakeList.txt文件里添加
set(CMAKE_BUILD_TYPE "Debug")
或者 set(CMAKE_BUILD_TYPE Debug CACHE STRING "set build type to debug")
然后再编译调试就可以了