microsoft / microsoft/vscode-cpptools

No stdout and stderr while debugging with gdbserver

Open
#6,076 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Debugger

Describe the bug

  • OS and Version: Ubuntu 20.04
  • VS Code Version: 1.48.2
  • C/C++ Extension Version: 0.29.0
  • Other extensions you installed (and if the issue persists after disabling them):
  • A clear and concise description of what the bug is

I have a launch configuration to connect to gdbserver running inside docker.
Everything works well, I can set breakpoints and see variables, but I don't get any output at all, not in the "output" panel and not in the "debug console".

I tried changing "externalConsole" as I saw in other issues, but it didn't help.

My launch.json file:

{
	"version": "0.2.0",
	"configurations": [

  {
			"name": "C++ Launch (GDBSERVER)",
			"type": "cppdbg",
			"request": "launch",
			"miDebuggerServerAddress": "localhost:2000",
			"preLaunchTask": "start-gdbserver",
			"miDebuggerPath": "/usr/bin/gdb",
			"targetArchitecture": "x64",
			"program": "reassembly",
			"args": [],
			"stopAtEntry": false,
			"cwd": "${workspaceRoot}",
			"sourceFileMap":{
				"/home/develop/project": "${workspaceRoot}",
				"/usr/include/c++/9.3.0": "/usr/include/c++/9"
			},
			"environment": [],
			"externalConsole": false,
	}
 ]
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the supplied launch.json configuration with gdbserver running in Docker on Ubuntu, then observe the Output panel and Debug Console while the program runs. Compare the behavior of stdout and stderr with the expected debugger output; done means both streams are visible during the VS Code C++ debugging session.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, docker, ubuntu, vscode
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.