Mr.Tu
Mr.Tu

Reputation: 2733

How to trace the source code in QT?

I want to trace the source code , but when I set a breakpoint, the program doesn't pause. How can I do that and are there some settings I should set?

My environment is Qt SDK.

enter image description here

Upvotes: 0

Views: 2038

Answers (2)

forivall
forivall

Reputation: 9913

Since we've confirmed that your GDB is working properly, the problem is that in order to be able to debug Qt code, the Qt code needs to be compiled in debug mode.

Be warned though, it will take a lot of time to compile Qt in debug mode.

Upvotes: 3

mmirzadeh
mmirzadeh

Reputation: 7089

You should compile under Debug mode and hit start debugging instead of normal run. I use to have the same exact problem. Here, this might help: How to use debugger in Qt Creator

Upvotes: 2

Related Questions