New to this stuff and vscode wont let me debug my C++ file. Whenever i hit F5, i get the following error:
Unable to start debugging. Unexpected GDB output from command "-environment-cd"d:\Users\MyName\\OneDrive\\Documentos\\My Projects"". d:\Users\MyName\OneDrive\Documentos\My Projects: No such file or directory
This is my launch.json file. Ive already tried this solution with no results.
{
// 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 - Compilar y depurar el archivo activo",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": true,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\\Strawberry\\c\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Habilitar la impresión con sangría para gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe compilar archivo activo"
}
]
}
corc++code. The reason is most compilers use the command line and a space character on the command line separates arguments. To get around the issue the path needs to be quoted.impresiónandsangríaare causing problems.