[英]How to read input when debugging in C++ in Visual Studio Code?
[英]When debugging C++ code using Visual Studio Code, is it possible to automatically step over standard includes
例如:在下面的代码中,注释行中的一个步骤将跳转到标准字符串 header。
有没有办法避免这种情况?
#include <string>
#include <iostream>
int main()
{
std::string a = "Example String"; /// < Step IN here
std::cout << a << std::endl;
}
打开:工具 > 选项 > 调试 > 常规 > []启用仅我的代码。
看来我可以对最新版本的 gcc(7.12.1 或更高版本)执行此操作,并在 .gdbinit 文件中使用以下内容
skip -gfi /usr/include/c++/*/*/*
skip -gfi /usr/include/c++/*/*
skip -gfi /usr/include/c++/*
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.