How can I make QtCreator break on exceptions?

半城伤御伤魂 提交于 2019-12-18 04:28:07

问题


I am Debugging some BOOST unit tests in QtCreator and it sadly happened that they crash with an exception. How can I make QtCreator automagically break if any exception is raised? In Visual Studio there is a tick box for this one, is it also available in QtCreator?

In my case, BOOST catches the exception, so the program doesn't technically crash. However, the reported message is not really helpful.

I tried the same in KDevelop previuosly, hence I am asking separate questions about both of these IDEs.


回答1:


  • Open Debug mode (Ctrl+F4 or just 4th mode on right bar).

  • Open context menu in breakpoints list at right bottom:

  • Select "Add Breakpoint" and set the breakpoint type to "Break when C++ exception is thrown":



来源:https://stackoverflow.com/questions/16735413/how-can-i-make-qtcreator-break-on-exceptions

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