Results 1 to 7 of 7

Thread: How do i debug in QtCreator?

  1. #1
    Join Date
    Feb 2010
    Posts
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default How do i debug in QtCreator?

    Hi all,

    I am very new to QTCreator .I have an application in Qtcreator and its building properly.When i am clicking 'Start debugging option in the Debug menu ',its not hitting the break point and its showing 'Program exited with code zero'.

    Do i have to do any prior settings before debugging an app in Qt creator................Could anyone plz help me in dis.......am really stucked up.........I have seen some threads regarding dis,but i couldnt find any solution in those.................plz help me out?

    Regards,
    Payal

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How do i debug in QtCreator?

    Are you running in debug mode ?
    Also try putting break point at the start of application if it reaches there.

  3. #3
    Join Date
    Feb 2010
    Posts
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do i debug in QtCreator?

    Thanks for replying.......

    Under the build menu, in the set Build configuration Only release mode is available.......So do i have to make any changes on the mode , if so plz tell me how?

    yaa,i am keeping breakpoint in the main() itself....and once i starts debugging, it stops the debugging and giving in the compiler output ,program exited with code 0....

    Plz do reply me........

    Also, i am running QT Creator in linux..

  4. #4
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How do i debug in QtCreator?

    hi payal,
    pls check the following to solve ur problem
    1)press ctrl + 4 -> u have a projects configuration screen
    Under Build Settings , Debug should be selected
    2) on BuildSteps , select qmake build configuration = debug

    Here im attaching the screenshot of the configuration
    please check the attachment.
    hope it helps
    Bala
    Attached Images Attached Images
    Last edited by BalaQT; 19th February 2010 at 11:14.

  5. #5
    Join Date
    Feb 2010
    Posts
    31
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How do i debug in QtCreator?

    Thanks alot Bala............I am able to debug it........

  6. #6
    Join Date
    Feb 2010
    Posts
    2

    Default Re: How do i debug in QtCreator?

    Hi!

    I'm having the same problem but I'm not able to debug. I get the error "Executable failed: you can't do that without a process to debug". But I can debug it with gdb from console.

    Thank's!

  7. #7
    Join Date
    Aug 2009
    Location
    coimbatore,India
    Posts
    314
    Thanks
    37
    Thanked 47 Times in 43 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: How do i debug in QtCreator?

    pls check the following ,
    make sure u have correct path settings in the TOOLS->OPTIONS

    Bala

Similar Threads

  1. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 07:27
  2. Replies: 1
    Last Post: 10th February 2010, 08:28
  3. DEBUG macro not defined in debug build using vc++
    By piotr.dobrogost in forum Qt Programming
    Replies: 0
    Last Post: 21st July 2009, 14:07
  4. "Debug Assertion failed" in debug mode
    By hed in forum Qt Programming
    Replies: 10
    Last Post: 4th February 2008, 13:10
  5. Replies: 11
    Last Post: 22nd March 2006, 20: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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.