問題描述
如何配置 Qt Creator 和/或 gdb,以便在使用 Qt 庫調(diào)試我的程序時,調(diào)試器將避免進(jìn)入 Qt 的源文件?
How can I configure Qt Creator and/or gdb so that while debugging my program using Qt libraries the debugger would avoid stepping into Qt's source files?
推薦答案
您需要關(guān)閉 auto-solib-add.在正常的 gdb 提示符下,您可以輸入:
You need to turn off auto-solib-add. From a normal gdb prompt you would type:
(gdb) set auto-solib-add off
在 Qt Creator 中,在 Options->Debugger->Gdb 下,您可以指定 Gdb 啟動腳本.創(chuàng)建一個包含set auto-solib-add off"命令的文件,然后將 Gdb 啟動腳本設(shè)置為該文件.
In Qt Creator, under Options->Debugger->Gdb you can specify a Gdb startup script. Create a file with the "set auto-solib-add off" command in it and then set your Gdb startup script to that file.
這篇關(guān)于使用gdb在Qt Creator中調(diào)試時如何避免進(jìn)入庫的源文件?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!