Results 1 to 8 of 8

Thread: switch to Debug build

  1. #1
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default switch to Debug build

    my Qt Project has no Debug mode, and I get the warning:
    Qt Code:
    1. This does not seem to be a "Debug" build.
    2. Setting breakpoints by file name and line number may fail.
    To copy to clipboard, switch view to plain text mode 

    How can I debug in this case?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: switch to Debug build

    You can still debug, as it said you might not be able to set breakpoints that depend on debug symbols being available.

    If you need that or want more detailed information during debugging, build the project in debug mode.

    Which IDE or build environment are you using?

    Cheers,
    _

  3. #3
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: switch to Debug build

    I am using Qt 5. the problem is that there is no debug mode in the project. it only has the Release mode available. I am afraid I need to create a new project and enable the debug mode by the time of creation.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: switch to Debug build

    The version of Qt is irrelevant, I was asking which IDE or build environment you are using.
    For example in QtCreator you can add additional build types, in a shell based build environment you can call qmake with commandline arguments or change the .pro file.

    The approach in a different IDE like Visual Studio could be very different, hence the question

    Cheers,
    _

  5. #5
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: switch to Debug build

    Quote Originally Posted by anda_skoa View Post
    The version of Qt is irrelevant, I was asking which IDE or build environment you are using.
    For example in QtCreator you can add additional build types, in a shell based build environment you can call qmake with commandline arguments or change the .pro file.

    The approach in a different IDE like Visual Studio could be very different, hence the question

    Cheers,
    _
    I am using QT Creator. So, How can I change the .pro file to enable Debug then?

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: switch to Debug build

    in Qt Creator you go to the project settings and add another build configuration.

    Cheers,
    _

  7. #7
    Join Date
    Feb 2012
    Location
    Armenia/Yerevan
    Posts
    400
    Thanks
    15
    Thanked 16 Times in 15 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: switch to Debug build

    Quote Originally Posted by anda_skoa View Post
    in Qt Creator you go to the project settings and add another build configuration.

    Cheers,
    _
    How Can I do that?

  8. #8
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: switch to Debug build

    project settings, add a new build using the option to copy the current one, add CONFIG += debug to the qmake commands

    You can also close creator, delete the .pro.user file and enable debug and relase when doing the initial project configuration when you open the .pro again

    Cheers,
    _

Similar Threads

  1. QTL: Debug build faster than release build?
    By tuli in forum Qt Programming
    Replies: 4
    Last Post: 17th March 2013, 23:49
  2. Qt + Linux + Eclipse - debug using debug build?
    By will49 in forum Qt Programming
    Replies: 6
    Last Post: 13th April 2012, 07:27
  3. Replies: 2
    Last Post: 4th October 2011, 00:04
  4. 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
  5. Replies: 3
    Last Post: 28th December 2007, 12:02

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.