准备工作:
使用ctrl+shift+p调出命令对话框,输入:task,选择:configure task runner,继续选择:others,即可产生tasks.json文件,改为如下内容:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "0.1.0",
"command": "gcc",
"isShellCommand": true,
"args": ["-g", "${file}", "-o", "${file}.exe"],
"showOutput": "always"
}
将“program”的值改为:
"program": "${file}.exe",
顺便在下面加上一行:
"miDebuggerPath": "C:\MinGW\bin\gdb.exe",
这里的miDebuggerPath即为gdb的安装路径。
按F5即可开始调试
Ctrl + Shift + P,Remove All Breakpoints
把断点和错误移除试试:
错误提示为,本地dll文件加载出问题,你之前是设置了什么吗
最后那个爆红的处理一下,检查一下编译器的路径是否放置正确