I am running a simple c++ program and set a breakpoint in VS Code. When I select "Run Without Debugging" DOES stop at the breakpoint. Is this a design or a bug? At least, it acts differently from the good & ole Visual Studio.
Thanks in advance.
For your reference, my tasks.json
is shown below:
{ // build hellowhox
"type": "cppbuild",
"label": "build hellowhox",
"command": "C:/msys64/mingw64/bin/g++.exe",
"args": [
"-g", "-DDEBUG",
"-o", "${cwd}/hellowhox", "${cwd}/hellowhox.cpp",
],
"options": {
"cwd": "C:/msys64/mingw64/bin"
},
"problemMatcher": [ "$gcc" ],
"group": "build",
"detail": "compiler: C:/msys64/mingw64/bin/g++.exe"
},
launch.json
as shown below:
"configurations": [
{
"name": "g++.exe",
"type": "cppdbg",
"request": "launch",
"program": "${cwd}/hellowhox.exe",
"args": [],
"stopAtEntry": false,
"cwd": "C:\msys64\mingw64\bin",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "C:\msys64\mingw64\bin\gdb.exe",
"setupCommands": [
{
"description": "gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "build hellowhox"
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…