问题
I use Qt Creator for C++ projects (non-Qt actually). This might be a dumb question, but how do you manage to use the debugger in Qt Creator
? I have been using CDB
along with VisualStudio or gdb
along with IDEs like Code::Blocks
and they are all intuitive to use. When it comes to Qt Creator
though, I'm hopeless!
For instance, I've tried putting breakpoints, but when I run the code, it just skips the breakpoints without doing anything! What am I doing wrong?
回答1:
- You should make "Debug" target, not "Release" one (located projects tab -> build settings -> build configuration)
- You should use Debug menu items "Start debugging", "Step over", "Continue" etc, not just "Run"
hope it helps.
来源:https://stackoverflow.com/questions/9730072/how-to-use-debugger-in-qt-creator