[Qt-creator] Breakpoints not working in QC1.1.0

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Sat May 2 01:04:06 CEST 2009


On Fri, May 01, 2009 at 03:25:14PM -0700, Leo Spalteholz wrote:
> I have a similar problem (QtCreator ignoring breakpoints completely)
> but it is happening on Windows.

By now this has been reported several times, and in all cases we
manage to examine close enough the problem was a release-only build.

I guess in the long run we would need to have to discover whether
the binary that's actually running is indeed a debug build, but 
for the short term, please double-check not only that it is a debug
build (Project settings) but alose whether the "Compile output" pane
mentions '-g' during compilation). Also, for starters, try to set
a breakpoint on 'main' using Debug -> Set breakpoint on function "main".

> Clean install of Qt SDK 2009.02, it's completely impossible to debug
> anything on Windows (tried two machines so far).  Both Windows XP SP3
> 32bit.  One is a dev machine, the other is an Asus EeeTop that has
> never had any development tools or Qt installed on it.
> Project is set to debug mode.  I rebuilt many times.  Also deleted all
> the makefiles and .pro.user files from previous version of QtCreator
> with the same result.

This should be pretty clean, indeed. But something goes wrong...
 
> Debugging seems to start, but breakpoints are never triggered.
> Installing Qt SDK 2009.01 (QtCreator 1.0) works just fine on the exact
> same projects.
> 
> The key difference seems to be that when opening a project in Creator
> 1.1, in the Projects tab, Debug, Build steps, there is no Gdb macros
> build option.  When clicking the plus button, the GDB macros build is
> also not an option to add (only custom build step).  This is a default
> 2009.02 installation, with no other Qt versions anywhere on the
> computer.

That's fine. There's no "Gdb macros build step" in 2009.02. I any case,
this part is optional anyway and does not influence brekpoints at all.

> When configuring Qt versions, it correctly lists 4.5.1 as the default
> Qt version.  The Qt path is correct, the mingw path is correct, and
> there is a green checkmark by the debugging helper.  I've tried
> rebuilding the debugging helper but it makes no difference (seems to
> compile fine).  There remains no option to build the GDB debug macros,
> and debugging doesn't work.

Please check there is a '-g' mentioned in the compiler output, and also
send (possibly privately to me) a copy of the contents of the right pane
of the "Gdb" View.

Andre'

PS:
> > On Friday 24 April 2009 12:48:10 ext Matt wrote:
> >> I am having a problem with using breakpoints with Qt Creator 1.1.0
> >> 32-bit.
> >>
> >> I am able to set the breakpoint and see it in the 'Breakpoints' tab
> >> and it has a number assigned to it when the debugger starts.

Incidentally, this means that Gdb accepted the breakpoint and reported
that. So if the breakpoint is not hit it might as well mean that this
line is never executed.




More information about the Qt-creator-old mailing list