Results 1 to 7 of 7

Thread: Qt + Linux + Eclipse - debug using debug build?

  1. #1
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Question Qt + Linux + Eclipse - debug using debug build?

    Not really a Qt question, but..

    I'm using Eclipse on Linux with Qt Integration to import my PRO file and compile my Qt 3.4 application.

    Everything is working fine, but when I try to run my application using the debugger, it always runs against the release build not the debug build and I can't get any detailed debugging data.

    I only seem have one Build configuration and Target in the Eclipse project.

    I presume I should have a debug and release build configuration. Is that correct? How do I add or select a debug configuration that runs with the debug build and not release?

  2. #2
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Linux + Eclipse - debug using debug build?

    There is no Qt 3.4 version. Do you mean 4.4 or 3.3?
    Qt integration is built around Qt 4.x. If you are using 3.x then you have to replace the QMake builder to a custom one. I can help you with that, but I need to know which Qt version you 're using.

    The new eclipse release (Ganymede, nice Greek name ) has huge CDT improvements by the way.
    I love deadlines. I like the whooshing sound they make as they fly by.
    --
    Douglas Adams

  3. #3
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt + Linux + Eclipse - debug using debug build?

    Sorry my mistake. I'm using QT 4.3.5 and Eclipse 3.4.0

    So I still can't figure out if there is some setting I'm missing to "debug" using the debug build, or something else I need to do.

    If I got to "Project" -> "Make Target" -> "Build" I do see "Qt Release Build" and "Qt Debug Build". But when I "F11" (debug), it uses the release and not debug build.
    Last edited by will49; 30th June 2008 at 19:19. Reason: updated contents

  4. #4
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Linux + Eclipse - debug using debug build?

    Check under Run->Debug Configurations... the executable that the debugger will execute. Change that to the one generated by your debug build and you should be OK.
    I love deadlines. I like the whooshing sound they make as they fly by.
    --
    Douglas Adams

  5. #5
    Join Date
    Jul 2007
    Posts
    56
    Thanks
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qt + Linux + Eclipse - debug using debug build?

    Thanks for the reply. Some more info to make it a bit clearer:

    1. When I do a "Project->Build Project" it builds the release version and puts the executable in "/release"

    2. If I do a "Make Targets -> Build..." then select "Qt Debug Build", it compiles all of the objectcode stuff in "/debug", but the final executable is in "/release"

    So what I really don't understand is:

    1. How to I select the debug build so when I select "Build -> Build Project" it makes the debug binary and not the release? Otherwise its going to be debugging against an old version of the debug executable.

    2. Should the debug executable be in /debug or /release?

  6. #6
    Join Date
    Jan 2006
    Location
    Athens - Greece
    Posts
    219
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt + Linux + Eclipse - debug using debug build?

    Quote Originally Posted by will49 View Post
    1. When I do a "Project->Build Project" it builds the release version and puts the executable in "/release"
    Project->Properties->C++ Make Project will show you what your builder runs at each build.

    Quote Originally Posted by will49 View Post
    2. If I do a "Make Targets -> Build..." then select "Qt Debug Build", it compiles all of the objectcode stuff in "/debug", but the final executable is in "/release"
    Check your .pro file. You should NOT have a DESTDIR variable.

    Quote Originally Posted by will49 View Post
    1. How to I select the debug build so when I select "Build -> Build Project" it makes the debug binary and not the release? Otherwise its going to be debugging against an old version of the debug executable.
    Project->Properties->C++ Make Project Check that Build (Incremental Build) says debug.

    Quote Originally Posted by will49 View Post
    2. Should the debug executable be in /debug or /release?
    This is irrelevant. Wherever you put it. The convention is obvious...
    I love deadlines. I like the whooshing sound they make as they fly by.
    --
    Douglas Adams

  7. #7
    Join Date
    Apr 2012
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Qt + Linux + Eclipse - debug using debug build?

    Now a question following yop's comment: can we setup a project in 'Eclipse with Qt Integration' to have both Debug and Release configuration, such that we can configure separately and switch quickly between builds? What I mean with configure separately is to for example link a Debug static library to the Debug project config, and link a Release static library to the Release config.

    Thanks for answering! This thread is very helpful to me!

Similar Threads

  1. QWT fails in debug build
    By steg90 in forum Qwt
    Replies: 1
    Last Post: 11th November 2011, 06:53
  2. Unable to build Qt 4.4.0 debug libs with MinGW (pch error)
    By AlGaN in forum Installation and Deployment
    Replies: 2
    Last Post: 7th June 2008, 14:24
  3. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  4. Replies: 2
    Last Post: 8th November 2007, 20:15
  5. Adding custom defines when on debug build
    By chus in forum Qt Programming
    Replies: 2
    Last Post: 2nd March 2007, 11:38

Tags for this Thread

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.