简体   繁体   中英

How do you make the Qt source code available when debugging an application in Qt Creator?

I recently decided to compile Qt from source. I was under the mistaken understanding that doing so would mean that I would now be able to see the Qt source code when debugging my applications. However, when my stack involves Qt code, the stack is still shown in grey in the right panel and only bytecode is shown for the execution.

在此输入图像描述

Is there a specific option I need to pass to the configure script to enable this? Is this even possible?

I meet the similar problem when using Emacs+gdb. The problem was that path to source code compiled in library was something like src/core/qobject.cpp or even core/qobject.cpp. So debuger can not find suitable source file when I walk up and down through call stack. I solve the problem just configure gdb's search path. In qt creator you can try fix it by finding option to configure "gdb" parameters and add "-d path/to/qt/source/code" to gdb command line arguments.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM