I am new to Visual Studio Code. I am trying to debug a simple C++ code.
I edited my launch.json to be able to debug the app like this:
{
"version": "0.2.0",
"configurations": [
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/Calculator",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "lldb"
}
]
}
When I start debugging, the terminal is opened in the correct folder but the program is not executed. So the Visual Code does not stop in the breakpoints I want to check in the program.
In my task.json I have the following code:
{
"version": "2.0.0",
"tasks": [
{
"label": "Echo vars",
"command": "echo",
"args": [
"${env:USERNAME}",
"workspaceFolder = ${workspaceFolder}"
],
"type": "shell",
"problemMatcher": []
},
{
"label": "build",
"type": "shell",
"command": "g++ -g Calculator.cpp -o Calculator",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$gcc"
}
]
}
Can anybody help me on this?
Thanks in advance