I'm trying to run a C program in VSCode. I am working to get a valid launch.json file, but it's complaining about the "type": "cppvsdbg"
line, saying that the "Configured debug type 'cppvsdbg' is installed but not supported in this environment."
I tried starting fresh and debugging according to the VSCode website, but they have me using a "type": "cppdbg"
option, which won't work for me because it disallows newer options like "console"
. I also tried searching for keywords in this error, but could only find similar posts using different languages (mostly Python). So here we are!
I'm running a mac, OS Monterey 12.6, on an M1 Max chip. My VSCode version is up-to-date, "1.71.0 (Universal)".
My understanding is that cppvsdbg is Windows only
{
"name": "Debug (Windows)",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/build/Debug/MyApp.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"console": "integratedTerminal",
"preLaunchTask": "build_debug"
},
{
"name": "Debug (GDB)",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/Debug/MyApp.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"console": "integratedTerminal",
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build_debug"
}
in launch.json