Re: debugging a unit test
Quote:
Originally Posted by
Martin Drozdik
Dear all,
I am using Qt Creator 2.2.1 Based on Qt 4.7.3 (32 bit). There, I created a unit test using the File -> New File or Project-> Unit test. When I try to debug the unit test, I get a message in a popup window:
This does not seem to be a "Debug" build.
Setting breakpoints by file name and line number may fail.
And the breakpoints are ignored, even though I specified it to be a debug build in the left lower corner of the QtCreator.
You need to explicitly rerun qmake and rebuild your project.
Quote:
If you are using other build tools, make sure that you add the location of the QTestLib header files to your include path (usually include/QtTest under your Qt installation directory). If you are using a release build of Qt, link your test to the QtTest library. For debug builds, use QtTest_debug.
Please, could you explain me what is meant under use QtTest_debug ? I really have no idea here.
I tired:
QT += QtTest_debug
CONFIG += QtTest_debug
with no effect.
You are not using "other build tools", this applies when you have to manually add linking to QtTest libraries.
Re: debugging a unit test
Thank you very much! It works!
Re: debugging a unit test
Having the same issue - but, the above "fix" is not working on 4.8.1.
i don't find any reference to QtTest_debug anywhere in the Qt dirs...
Re: debugging a unit test
Thanks for your "It doesn't work" post... we'll just guess what you are doing.
The issue in the original post is easily fixed by:
- Tell QtCreator you want a debug build
- Rerun qmake
- Rebuild project