Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-23508

Skip built-in include paths while debugging

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 4.12.0-beta1
    • Debugger

      While debugging code that uses STL you don't want to debug STL itself, but just your code.

      With skip -gfi path/* one can skip all files from a specific directory.

      Qt Creator has a list of directories it considers build in, which on Windows using MinGW 7.3 looks like this:

            C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++(built-in include path)
            C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32(built-in include path)
            C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward(built-in include path)
            C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include(built-in include path)
            C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed(built-in include path)
            C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include(built-in include path)
      

      By adding the lines into Debugger's pre start commands:

      skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/*
      skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/*/*
      skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/x86_64-w64-mingw32/*
      skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/backward/*
      skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/*
      skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include-fixed/*
      skip -gfi C:/Qt/Tools/mingw730_64/x86_64-w64-mingw32/include/*
      

      I was able to skip all STL headers while pressing F11.

      Note that skip -gfi C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/*/* was not part of the initial list, and with this I needed to skip C:/Qt/Tools/mingw730_64/lib/gcc/x86_64-w64-mingw32/7.3.0/include/c++/bits/ directory.

      Qt Creator could have a combo box in Debugger dialog which would automatically enable skipping of the build in include directory paths.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            hjk hjk
            cadam Cristian Adam
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes