How to use debugger in Qt Creator

浪子不回头ぞ 提交于 2019-12-11 03:53:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!