Qt World Summit: Register Today!

Debugging in Creator: possible to lock a window?

  • Hi -

    When I'm debugging in Creator, I often like to move the "Locals and Expressions" view into an external window, so I can make it nice and big, and not interfere with the source code display.

    It seems that when I do this, though, whenever I leave debugger mode (or focus on another process), the window goes away, which is kind of annoying.

    Is there some way to lock an external window the way one can lock a view in Creator, or at least somehow tell Creator to keep that external window open until I explicitly dismiss it?


  • i never use Qt Creator debug mode cuz it's not user friendly. i prefer using qDebug() instead.
    you may give a suggestion at http://bugreports.qt.nokia.com/

  • Why do you leave debugger mode then? It seems logical to me that windows that are associated with a mode, are not shown when not in that mode. What else would the mode mean?

    qDebug is obviously not a replacement for using a debugger, but I guess you'll find that out sooner or later.

  • Yes Andre, It's not a replacement for debugger but Qt Creator Debug environment is not much familiar to me. I use it only when i have mathematics problems.

  • Hi, Andre -

    Terrible wording on my part. The window goes away when leaving the debugging mode, but doesn't return when you re-enter debugging mode.

    I've noticed that this isn't 100% true, and I'm trying to nail down exactly what the criteria, but there are lots of variables. I think as long as a debugging session is active, when you leave and return, you'll get the window back. I think it should return no matter what; as though the window is a preference or a configuration option for the mode.

    FWIW, I'm very happy with the debugger interface in Creator. If I could just figure out a way to view the contents of various objects (like vectors or stacks), I'd be even happier, but...it works wonderfully for me.

  • Ah, ok. Yes, I agree the window should return where you last left it if you return to debugging mode. I suggest you file a bugreport at the URL mohson mentioned earlier if this is not the case.

  • [quote author="mzimmers" date="1320677235"]FWIW, I'm very happy with the debugger interface in Creator. If I could just figure out a way to view the contents of various objects (like vectors or stacks), I'd be even happier, but...it works wonderfully for me.[/quote]

    vectors and stacks (both Qt and std) should be displayed nicely out-of-the-box (unless you actively disabled "Use Debugging Helpers" or such). If it doesn't for you, file a bug and attach the debugger log (content of right pane of Windows->Views->Debugger Log)

  • Here's what it looks like to me:

    !http://scopedin.com/images/qtdebug.jpg(debug window)!

    I can see the first and last element, but know of no way to see the ones in between.

    And, I do have debugging helpers enabled.

  • Sorry, that's a snapshot of the "Locals and Expressions" window, not the contents of the right pane of "Windows->Views->Debugger Log". That would be quite a bit of text, so putting it on pastebin.com and just posting a link here might be an option. The log contains your debugger configuration, so it's much easier to spot the reason for your problem. From the screenshot I only see that the "helpers" do not work at all for you, but not why.

  • Is there a way to clear the debugger log?

  • There's something in the context menu of that view.

  • Got it...thanks.

    The debugger log, and the commands window are in files here:

    "debugger log":http://scopedin.com/text/

  • Mac... we could have figured that out quicker. Go to Tools->Options->Qt Version (or something similar), select the Qt version you are using, and "Rebuild" the debugging helpers.

  • I can't find that command, and I have to leave for a meeting now. I'll look around for it later, and report back. Thanks.

    EDIT (for posterity): this is in preferences. Qt Creator->Preferences->Qt4, under the "Helpers" area (you have to click on "Details" to see what you're looking for. Then, build them...and sit for awhile, because it takes a few minutes, and you don't get any feedback while that's happening.

    Anyway, I built the helpers...so, where should I look for the improved display of vectors and stacks and stuff? The "Locals and Expressions" window looks the same.

  • Any ideas, guys? Helpers are built and enabled, but I'm not seeing anything different. It would be very nice to have an improved view into some of the STL data structures.


  • Do you see any difference in the debugger log? The lines "dState changed from InferiorRunOk(11) to InferiorStopOk(14). dThe debugging helper library was not found at ." should look different now.

  • Upon closer look, it appears that this is partly solved:

    I searched the debugger log for "helper library" and found nothing, so I assume that error is gone.

    Some vectors are displaying better now. Here's a screenshot of a locals windows. The vector nyqInp (passed to the active routine as a parameter) is now displayed "nicely," but the member vectors coeffBuffer and inpBuffer aren't.

    !http://scopedin.com/images/qtdebug2.jpg(qt locals window)!

    At least this is progress, but I'd really like to be able to see into member vectors, too.

  • Any ideas from anyone on this? Thanks.

  • Should I start a new thread with a different subject on this? It appears that the helper doesn't "help" on stuff pointed to by the "this" pointer.

Log in to reply