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

Leo Spalteholz leo.spalteholz at gmail.com
Tue May 5 19:08:24 CEST 2009


On Tue, May 5, 2009 at 2:56 AM, Eike Ziller <eike.ziller at nokia.com> wrote:
>
> On May 4, 2009, at 11:32 PM, ext Leo Spalteholz wrote:
>
>> On Fri, May 1, 2009 at 4:04 PM, Andre Poenitz
>> <andre.poenitz at mathematik.tu-chemnitz.de> wrote:
>>> 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".
>>
>> That's it.  Even when the build configuration is set to debug, it was
>> still compiling in release mode.
>>
>> Turns out in my .pro file (which came from pre-QtCreator days), I had
>> put in a CONFIG += release, so that's what was causing the problem.
>> Removing that line solves everything.
>>
>> So the problem was a change in behaviour between QtCreator versions.
>> In 1.0, specifying Debug mode in the build configuration overrides
>> whatever is in the CONFIG in the pro file, in QtCreator 1.1, the pro
>> file overrides the build configuration setting.  I don't know what is
>> more correct, but it is certainly confusing to set Debug and end up
>> with a release build.
>
> There might be no "right" way to do it :)

Right.  Although perhaps there could be a warning when switching to
the Debug build config, if the pro file is overriding it with a CONFIG
+= release (or vice versa).  Then at least dense people like me won't
be confused :)

Leo




More information about the Qt-creator-old mailing list