使用VScode 调试的时候提示Unable to start debugging. Launch options string provided by the project system is invalid. Unable to determine path to debugger. Please specify the “MIDebuggerPath” option.
出现这个问题后,找了很多方法,怎么修改launch.json
依然还是会报这个错误
后来看了一下https://my.oschina.net/u/4287454/blog/3913622
其中提到了对cmake tool插件的设置
于是我打开文件->首选项->找到cmake tools configuration插件
进入settings.json
在里面加上一段
"cmake.debugConfig": {
"miDebuggerPath": "D:\\Program Files\\mingw64\\bin\\gdb.exe",
"externalConsole":true,// 使用外部控制台
"stopAtEntry": false
},
"git.ignoreLimitWarning": true,// //开启自动保存
然后再点击
图片上这只小虫子后,程序调试就正常了
搞了好久的launch.json,怎么按网上的改都不对
原来要改的是插件的设置
记录一下,
希望能给遇到同样问题的朋友一点帮助