Qt – Why won’t the breakpoints work in Qt Creator

breakpointsqtqt-creator

Qt creator can build and run my projects perfectly, but it will skip straight over any breakpoints I set. I can't find any options to fix this, and I'd appreciate some help.

EDIT: The SDK is built in debug mode, and the project build configuration is set to debug.

Best Answer

If this is a cmake build, you need to set the build type before setting the project, so eg in your top CMakeList.txt:

SET(CMAKE_BUILD_TYPE Debug)
project(mybuildtype)

Officially, you can pass this also to cmake in Projects section when running cmake: http://qt-project.org/forums/viewthread/12694, so with -DCMAKE_BUILD_TYPE=Debug flag, but this does not longer seem to work... If you want a flag working, you need to test on it before setting the project, see http://www.cmake.org/pipermail/cmake/2008-September/023808.html

Related Topic