2

Using Qt Creator, Qt 5.3, VC12 (VS2013)

When I set a "Break when c++ exception is thrown" breakpoint in Qt creator, my application becomes extremely slow. Maybe 5-10 slower than running with other breakpoints such as "File name and line number"

Break when exception is thrown

Why is debugging with this kind of breakpoint so slow? Just curious ..

-- Edit --

As of CR's comment, do I face an abnormality on my system?

Horst Walter
  • 13,663
  • 32
  • 126
  • 228
  • 1
    Probably because the debugger inserts extra instructions to check for exceptions everywhere. – Some programmer dude Jul 03 '14 at 12:36
  • 1
    I enabled this too, but no perceivable performance difference. – Siyuan Ren Jul 03 '14 at 15:11
  • Good to know, in my scenario reproducible. Win7 system, 32 bit. It goes as far, that in the moment I delete such a breakpoint performance is back to normal. Noteworthy: Disabling does not help, only deleting. CR, what is your setup, WIN or something else? – Horst Walter Jul 03 '14 at 15:54
  • 1
    To my experience debugging with QtCreator on Windows with VS is very slow, comparing to that on Linux or OS X. I suspect it's because it tries to download symbols from Microsoft site all the time, but I'm not sure though. Have you tried with MinGW compiler? – Archie Jul 03 '14 at 16:12
  • Not yet in this particular case, but MinGW on Win7 ("my system") is usually much slower compiling (not the topic here), and also in terms of starting the debugger. Then (after startup) debugging performance is the same, will need to try this very scenario – Horst Walter Jul 03 '14 at 16:34
  • Tested: MinGW does not suffer from that performance degradation with such breakpoints. – Horst Walter Jul 03 '14 at 23:13
  • 1
    You can potentially speed up MinGW compilation by adding -jX to your make options, where X is generally the number of cores on your machine. – Retired Ninja Jul 03 '14 at 23:58

1 Answers1

1

It is a problem with the Microsoft-provided debugger that you have downloaded to use with Qt Creator. The debugger that Qt Creator uses is not the visual studio debugger, since the latter IIRC can't be easily used externally. Unfortunately there's nothing that Qt Creator could do to improve things, I don't think, short of using a non-existent port of, say, lldb.

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313