Home > Back-end >  When debugging C code using Visual Studio Code, is it possible to automatically step over standard
When debugging C code using Visual Studio Code, is it possible to automatically step over standard

Time:08-28

For example: on the code below a step in on the commented line will jump to the standard string header.

Is there a way to avoid this?

#include <string>
#include <iostream>

int main()
{
    std::string a = "Example String"; /// < Step IN here 

    std::cout << a << std::endl; 
}

CodePudding user response:

Turn on: Tools > Options > Debugging > General > [ ] Enable Just My Code.

CodePudding user response:

It appears I can do this for recent versions of gcc (7.12.1 or higher) with the following in the .gdbinit file

skip -gfi /usr/include/c  /*/*/*
skip -gfi /usr/include/c  /*/*
skip -gfi /usr/include/c  /*
  • Related