C++ – How to avoid entering library’s source files while debugging in Qt Creator with gdb

cdebugginggdbqtqt-creator

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?

Best Answer

You need to turn off auto-solib-add. From a normal gdb prompt you would type:

(gdb) set auto-solib-add off

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.