Skip to content

"Run Without Debugging" does stop at a breakpoint in VS Code. A bug or a design? #6755

@idebtor

Description

@idebtor

Issue Type: Bug

  1. Write a simple c++ program such as printing "Hello World" and return 0;.
  2. Set a breakpoint at printing "Hello World" line.
  3. Run it with "Run Without Debugging", then the debugger runs and stops at the breakpoint.

Is this a design or a bug?
At least, it is different from good and ole MS Visual Studio that I have used for a long time. I am pretty new to using Code. I am afraid that did something wrong in my setups. Let me show them as well for your references.

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 is 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"
        }

Extension version: 1.1.3
VS Code version: Code 1.52.1 (ea3859d4ba2f3e577a159bc91e3074c5d85c0523, 2020-12-16T16:34:46.910Z)
OS version: Windows_NT x64 10.0.18363

System Info
Item Value
CPUs Intel(R) Core(TM) i3-8145U CPU @ 2.10GHz (4 x 2304)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.86GB (8.93GB free)
Process Argv --crash-reporter-id 174b2664-9ba6-44cb-a6a3-200479fb5d7c
Screen Reader no
VM 67%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
openlogontheside:30221877
python383:30185418
pythonvspyt700:30237718
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30211402
wsl2prompt:30224612
pythonvsdeb440:30242242
unusedpromptcf:30224611
folderexplorercf:30224615
openfilemenu:30224647
pythonvsded773cf:30236630
pythonvspyt600cf:30241728

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions