PDA

View Full Version : switch to Debug build



saman_artorious
8th June 2013, 10:04
my Qt Project has no Debug mode, and I get the warning:

This does not seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.

How can I debug in this case?

anda_skoa
8th June 2013, 11:57
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,
_

saman_artorious
8th June 2013, 14:36
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.

anda_skoa
8th June 2013, 15:25
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,
_

saman_artorious
10th June 2013, 09:43
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?

anda_skoa
10th June 2013, 16:55
in Qt Creator you go to the project settings and add another build configuration.

Cheers,
_

saman_artorious
12th June 2013, 07:24
in Qt Creator you go to the project settings and add another build configuration.

Cheers,
_

How Can I do that?

anda_skoa
12th June 2013, 10:25
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,
_