Results 1 to 5 of 5

Thread: Maybe debug are "mission impossible" ?

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    56
    Thanked 1 Time in 1 Post

    Default Maybe debug are "mission impossible" ?

    I dont know if I'm doing something bad, but If I try to debug my app I spend a lot of time.
    Besides, I'm unable to detect the place when my program crash....
    And is it possible that a simple var asignation consumes almost 1 second ??? (so If I want to review some var values and to know if some are the responsible of crashing I spend a lot of time.... )

    I need your help. Or maybe debugging with QTcreator+Mingw (Win xp) are "mission impossible" ?

    Any tutorial or link ?
    Thanks

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: Maybe debug are "mission impossible" ?

    Are your breakpoints working?

    Tip: Let the program crash, and then have look at the call stack, and find out the last function which was written by you was called, mostly it will be the culprit

    http://doc.qt.nokia.com/qtcreator-2....g-example.html

  3. #3
    Join Date
    Sep 2010
    Posts
    654
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    56
    Thanked 1 Time in 1 Post

    Default Re: Maybe debug are "mission impossible" ?

    Yes, but the step betwen line and line spends 1 second ..... (as I said, are simple var asignations...)
    My impression is that debug is very very slow...

  4. #4
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: Maybe debug are "mission impossible" ?

    It can take time, it depends on your software environment factors, the better is to use breakpoints, and let it run freely till the break point, which is lot quicker, than stepping.

  5. #5
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Maybe debug are "mission impossible" ?

    Under MinGW the gdb debugger does take quite a while to load the debug version of your program and all the debug versions of referenced libraries. It is far slower to start than it is on Linux but still only measured in seconds. Once loaded the program will be a bit slower but nothing like a second per simple statement.

    If your "simple var asignations" are taking a time measured in seconds then I'd be taking a long hard look at any constructors involved for tight endless (or nearly endless) loops, repetitive memory allocations, or long processes. If you can reproduce the problem with a 10-20 line program then by all means post the code here.

    When the program crashes in the debugger read the stack backtrace from the top (most recent call) until you reach something in your code. That's where it crashed.

Similar Threads

  1. Replies: 3
    Last Post: 15th February 2010, 17:27
  2. Replies: 3
    Last Post: 29th August 2009, 22:24
  3. Replies: 1
    Last Post: 8th January 2009, 13:36
  4. "Debug Assertion failed" in debug mode
    By hed in forum Qt Programming
    Replies: 10
    Last Post: 4th February 2008, 12:10
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.