Jon Helt-Hansen
Jon Helt-Hansen

Reputation: 393

Debugging android app on target in QtCreator

When I try to run a Debug build of my application, with the debugger attached, on my phone via USB debugging, I get a message saying:

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

I am able to set breakpoints in my main function, but I cannot get access to intermediate values or set breakpoints in any sub-functions.

Screenshot:

enter image description here

Upvotes: 4

Views: 3299

Answers (2)

Mark
Mark

Reputation: 186

I ran into a similar problem and the problem in my case was that gdb was being run with the cdb engine. It may have resulted from corruption in the Qt Creator profiles.xml file.

To check, go to tools -> options -> build and run -> kits and select the kit you are using. Next, go to the debugger line, choose edit, and make sure you have the right engine for your debugger.

If that is not it, to debug further, consider looking closely at your Makefiles, execution directories, et c. Another question that was related to the "does not seem to be a debug build" message was resolved by simply cleaning and rebuilding. Another solution might be to build a new fresh kit.

Upvotes: 5

giuspen
giuspen

Reputation: 1401

You have to add the following to your .pro file:

CONFIG += debug

Upvotes: 0

Related Questions