[Qt-creator] Debugging in Win32

André Pönitz apoenitz at trolltech.com
Wed Nov 5 12:51:01 CET 2008


On Wednesday 05 November 2008 12:13:12 Greg Santucci wrote:
> I'm running the Windows version on an XP machine, and the debugger doesn't work.
> 
> Steps to reproduce:
> 
> 1) Make a new Qt4 Gui project
> 
> 2) Set a breakpoint in the constructor of MainWindow
> 
> 3) Hit debug
> 
> Witness it compile, but the debug never commences. The compiled program 
> does run though. Breakpoints placed in the main function do work though,
> but the debugger takes some time to start.   
> 
> I can't find any references to this problem anywhere.

You provided already all relevant information ;-)

   http://www.google.com/search?q=breakpoint+constructors+gdb 

points to

   http://vladimir_prus.blogspot.com/2007/11/breakpoints-in-constructors.html

In short: Breakpoints in C++ constructors do not (reliably) work. 

Somewhat longer: Vladimir's blog explains the problem, it is partially solved
in recent gdb, but the version that's available on Windows  is not sufficient.
But even that "solution" in recent gdb is not robust. The multiple breakpoints
that gdb now sets are not properly reported by gdb's "Machine Interface",
so it involves some guessing on the client side, and that can go wrong... 

Regards,
Andre'



More information about the Qt-creator-old mailing list