Help with Debugger settings

  • I can't figure out how to stop all the excess files from popping up when I use the debugger. All I'm doing is following the creation of objects from various classes. I want the debugger to go from line to line in main.cpp. But what it's doing is pulling up various internal Qt files. For example, I have a vector of objects. When I run the debugger and step into (F11) main.cpp, many Qt vector files are pulled up and I have to step through them, too. While I can see that could be good for certain situations, this isn't one of them. I only want to step through main.cpp.

    I'm doing a Udemy C++ course where the instructor uses CodeLite. That's what I started out using. CodeLite lets me step into file instructions without throwing me into a slew of other files. But when I switched to Qt (because I want to use Qt solely), using the debugger's became a nightmare. How can I make Qt do like CodeLite during bebugging?

    I'm using Qt Creator 4.12.4 with GCC 9.3.0 and GDB which I believe is 9.1.0.

  • Maybe use F10, and don't step into if you won't. Read the doc of the debugger

  • I think this is a similar question

    with the (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.*

  • @khryleption That did the trick. Thanks.

Log in to reply