Skip to content

"Run Without Debugging is not supported" message, even though it works #14515

@Magyar57

Description

@Magyar57

Environment

  • OS and version: Linux 7.0.11-arch1-1
  • VS Code: 1.124.0
  • C/C++ extension: 1.32.2
  • GDB / LLDB version: gdb 17.2

Bug Summary and Steps to Reproduce

An annoying message:

Run Without Debugging is not supported for configurations with 'miDebuggerServerAddress' set.

appears in the output tab of vscode, focusing it, when launching a remote debug session with the Debug: Start without debugging vscode command. This message appears despite the 'run without debugging' feature working as expected (it does not stop at breakpoints).

To me, the issue is the combined, annoying fact that:

  • run without debugging works fine
  • the "output" tab gets focused, hiding the terminal output

If run without debugging actually didn't work, it would make sense to show this tab. But it actually works how intended (or at least for what I need it for)

The issue was introduced with this commit: 291e5a3

Steps to reproduce:

  1. mkdir -p test/.vscode
  2. echo 'int main(){return 0;}' >test/main.c && gcc -g -O0 test/main.c -o test/main
  3. code test
  4. Write to test/.vscode/launch.json:
{
    "version": "0.2.0",
    "configurations": [
		{
		"type": "cppdbg",
		"request": "launch",
		"name": "reproduce",
		"cwd": "${workspaceFolder}",
		"program": "${workspaceFolder}/main",
		"MIMode": "gdb",
		"miDebuggerServerAddress": "127.0.0.1:12345"
		}
    ]
}
  1. Start a fake GDB (TCP) server: nc -l 12345
  2. code test
  3. Open command palette, run Debug: Start without Debugging, selecting the reproduce target

You can see the warning in the OUTPUT panel, which has been focused.
The connection will timeout, because there is no actual gdb server. But if there is, debugging works absolutely fine. I'm sorry i can't provide a more accurate reproduction, without effectively providing my entire project

Debugger Configurations

{
    "version": "0.2.0",
    "configurations": [
		{
		"type": "cppdbg",
		"request": "launch",
		"name": "my_wonderful_reproducable_bug",
		"cwd": "${workspaceFolder}",
		"program": "${workspaceFolder}/main",
		"MIMode": "gdb",
		"miDebuggerServerAddress": "127.0.0.1:12345"
		}
    ]
}

Debugger Logs

Run Without Debugging is not supported for configurations with 'miDebuggerServerAddress' set.

Other Extensions

No response

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdebuggerhelp wantedCan be fixed in the public (open source) repo.tasks/build/debugAn issue relating to tasks.json (e.g. build issues)

    Type

    No fields configured for Bug.

    Projects

    Status
    Pull Request

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions