[Qt-creator] Introduction to debugger for MSVC Users / how to use nmake

Andre Poenitz andre.poenitz at mathematik.tu-chemnitz.de
Sun Nov 22 21:50:52 CET 2009


On Sun, Nov 22, 2009 at 08:44:12PM +0100, Matthias Pospiech wrote:
> I am used to the debugger integratet into Visual Studio 2005, and that
> is the only debugger I ever used.
> 
> First thing that I find strange is the time it take to break at a
> breakpoint. From cklicking on an Menu entry and the breakpoint int the
> signal was about 10s, moving from one line to the next sometimes 20s.
> (compared to non-noticable delay times in VS.)

You need to give a few more details about your environment, like what
compiler/debugger you are currently using, and what exactly you are doing.
Does that happen for every breakpoint you set, or only for the first one?

>From the context it sounds like you are using MinGW/gdb. Gdb is slow in
general, gdb on Windows even worse. There have been some improvements in
the latest release (gdb 7.0), unfortunately that same release introduced
a few bugs that makes it unsuitable for use with Qt Creator.

But even with gdb 6.8, 20s for an average step is too much. There are
circumstances when e.g. loading of QtGui debug information stalls the
debugger for that long, but an average step should take less than two
seconds. So it would be really good to know what kind of environment
that is, what kind of project you are debugging etc.
 
> The next thing I do no understand is how to look at variable values.
> In VS I point the mouse over the variable and see the value, or I mark
> the variable and select view. In QtCreator I could not find a single
> entry in the context or application menu that has anything to do with
> watching variable values.

Options->Debugger->Common->Use tooltips in main editor while debugging.

Note that this uses a purely string based approach to determine what's a
variable and does not understand scopes at all. I strongly suggest to
get used to using the Locals and Watcher view.

> And a different aspect: I have read that QtCreator can use nmake and
> the MS debugger.  However I could not find an entry, where I select
> the compiler and QtCreator would take care if the remaining setup of
> the Makestep. 

Options->Qt4->Qt versions / Project->Build settings. You need to select
a Qt built with MSVC there (and build/dowload such a thing first).  The
debugger will adapt automatically. Before raising too much hope: That
will still not give you the same speed as debugging in VS as Creator
cannot integrate the MS debugger as deep as VS for non-technical reasons.

Andre'



More information about the Qt-creator-old mailing list