I am learning the Visual Studio Code C/C++ Debugging Tool and I was following the tutorial here and when I go to start the deubbing. I am given this error.
I am running WSL/Bash on Ubuntu and I installed gcc/g++ and gdb on the WSL.
This is my code in launch.json. Lots of help appreciated.
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "/mnt/c/Users/myusername/Projects/CPP/helloworld/helloworld.out",
"args": [""],
"stopAtEntry": true,
"cwd": "/mnt/c/Users/myusername/Projects/CPP/helloworld/",
"environment": [],
"externalConsole": true,
"windows": {
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
},
"pipeTransport": {
"pipeCwd": "",
"pipeProgram": "C:\\Windows\\System32\\bash.exe",
"pipeArgs": ["-c"],
"debuggerPath": "/usr/bin/gdb"
},
"sourceFileMap": {
"/mnt/c": "C:\\",
"/usr": "C:\\Users\\myusername\\AppData\\Local\\Packages\\CanonicalGroupLimited.UbuntuonWindows79rhkp1fndgsc\\LocalState\\rootfs\\usr\\"
}
}
]
}