Reputation: 76
I don't what happened to my vscode all of a sudden I am not able to debug files although I am to run my CPP program but not able to debug please help me I spend 2-3 hours continuously trying to fix my debugger
my program is running fine and compiler is creating a exe file as shown below
when I hit the debug button this image appears
and then it stuck on this screen
when I press any kind of key it exits and the normal terminal window appears
it is just like it is trying to open the external terminal but not able to open it some how this is what i think spending a whole day solving this problem
Lauch.json file
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "g++.exe - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe build active file"
}
]
}
Task.json
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\MinGW\\bin\\g++.exe",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: C:\\MinGW\\bin\\g++.exe"
}
]
}
Upvotes: 0
Views: 6769
Reputation: 38
Deleting the
worked for me. Windows 10
for more information Please see: https://github.com/microsoft/vscode-cpptools/issues/7971
Upvotes: 1