Results 1 to 14 of 14

Thread: Debug problems!

  1. #1
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Arrow Debug problems!

    Hey,

    I'm trying to set breakpoints in my application that if I run doesn't have any problems, to learn watching the program code step by step.

    How can I see the program step by step?

  2. #2
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 29 Times in 27 Posts

    Default Re: Debug problems!

    It isn't clear from your post what tool are you using for debugging.
    Last edited by lyuts; 19th June 2009 at 09:26.
    I'm a rebel in the S.D.G.

  3. #3
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug problems!

    My compiler is MinGW.

    To run the application I push "Run" button.
    At the moment, I want to set breakpoints. To get this goal I go to Run tab, I choose toogle Line Breakpoint and I put in the line that I want to see.
    Now the problem is: what more I have to do to be able to see what the program does step by step?

    Thanks

  4. #4
    Join Date
    Jun 2007
    Location
    India
    Posts
    1,042
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    8
    Thanked 133 Times in 128 Posts

    Default Re: Debug problems!

    which IDE u are using?

  5. #5
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug problems!

    Sorry but I don't understand you what you are asking me!

    In the computer I have Windows XP and I'm programming with QT 4.4.3.

  6. #6
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 29 Times in 27 Posts

    Default Re: Debug problems!

    1. You told us that you push 'Run' button. Where is it located?
    2. What are you using to edit source code?
    I'm a rebel in the S.D.G.

  7. #7
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug problems!

    The code that i had programmed is written with C++.

    The Run button that I press is which appear in the document that I have attached you
    run.zip

  8. #8
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 370 Times in 336 Posts

    Default Re: Debug problems!

    so, you are using the Eclipse. IDE it's a Integrated Development Environment.
    so, you should add in your pro-file
    CONFIG += debug
    then rerun (import) your project again in the Eclipse and try to debug again.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  9. #9
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 29 Times in 27 Posts

    Default Re: Debug problems!

    Ok, now it is understood that you use Eclipse as your IDE. (But it was not obvious at the very beginning).
    As for debugging, I believe I remember seeing "Step into instruction", "Step over instruction" actions in Eclipse. After debugging hits your first breakpoint it pauses, and from that point you can run it step by step using those actions.
    I'm a rebel in the S.D.G.

  10. #10
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug problems!

    I can't add to my .pro what they said to me.

    Can you explain me a little bit more?

  11. #11
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Wiki edits
    5

    Default Re: Debug problems!

    Quote Originally Posted by IRON_MAN View Post
    I can't add to my .pro what they said to me.
    Yes, you can! Can I kick it? Yes, you can!...

    In Eclipse right mouse click on the *.pro -> open with -> Text Editor. Voilà , you can add the CONFIG variable!

  12. #12
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug problems!

    ok,i have add it!

    now I run the application, I push debug and I take these errors:

    Error creating session
    Cannot run program "gdb": Launching failed
    Cannot run program "gdb": Launching failed
    Cannot run program "gdb": Launching failed

    ???

  13. #13
    Join Date
    May 2008
    Location
    Kyiv, Ukraine
    Posts
    418
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 29 Times in 27 Posts

    Default Re: Debug problems!

    You need to install gdb. It is not in you mingw bin directory.
    Get it from here https://sourceforge.net/project/show...ease_id=594520
    Last edited by lyuts; 19th June 2009 at 13:10.
    I'm a rebel in the S.D.G.

  14. #14
    Join Date
    Jun 2009
    Posts
    41
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Debug problems!

    THANK YOU!!!

    the problem is solved!

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 06:27
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. What is debug mode for without MSVC?
    By firegun9 in forum Newbie
    Replies: 1
    Last Post: 5th September 2007, 17:21
  4. Adding custom defines when on debug build
    By chus in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 11:38
  5. Replies: 11
    Last Post: 22nd March 2006, 19:06

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.