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.
If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.
Add a breakpoint at the end of the startNewGame() function, and click (Continue) to hit the breakpoint. To execute JavaScript commands in the current context, open the QML Debugger Console. To remove a breakpoint, right-click it and select Delete Breakpoint. In the Locals view, explore the object structure at runtime.
To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With