Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Run Without Debugging" does stop at a breakpoint in VS Code. A bug or a design? [duplicate]

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.jsonis 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"
        }
like image 867
Youngsup Kim Avatar asked Feb 22 '26 03:02

Youngsup Kim


1 Answers

Finally, I got an answer from VS Code-cpptools development team. It is neither a design nor a bug, but not implemented YET.^^

Their response here

For your information:

Duplicate of #5680

The cpptools debuggers (cppvsdbg and cppdbg) do not support run without debugging. We ignore the noDebug boolean in LaunchRequestArguments . We will just start a debug session. This wil need to be implemented.

See: #5680 (comment)

like image 184
Youngsup Kim Avatar answered Feb 25 '26 15:02

Youngsup Kim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!