microsoft / microsoft/vscode-cpptools
Standard error not printed when using PipeTransport
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
- OS and Version: ( local ) Windows_NT x64 10.0.18363 & ( remote ) Red Hat Enterprise Linux Workstation release 7.4 (Maipo)
- VS Code Version: Version: 1.44.2
- C/C++ Extension Version: 0.27.0
Environment : VSCode from local computer, connection trough remote-ssh to a Linux computer able to run VSCode then using pipeTransport to a dedicated machine to work on, where vscode can't be launch trough remote-ssh ( older os ).
When debugging with pipe transport, message to standard error are not displayed, although received. It's also reproducible with gdb command -exec p printf(stderr,"stderr")
To Reproduce
main.c
#include <stdio.h>
int main(int argc, char *argv[])
{
fprintf(stdout,"stdout\n");
fprintf(stderr,"stderr\n");
return 0;
}
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/a.out",
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "ssh",
"pipeArgs": [
"dedicated"
],
"debuggerPath": "/usr/bin/gdb"
},
"logging": {
"engineLogging": true,
}
}
]
}
Steps to reproduce the behavior:
- Compile the program
- Launch VSCode debugger
- Look for lines in the debug console
1: (7622) STDERR: stderr ---------------------> Program printed to stderr, GDB received it
1: (7626) ->^running ---------------------> Didn't display it
1: (7626) ->*running,thread-id="all"
1: (7626) ->(gdb)
1: (7626) ->stdout ---------------------> Program printed to stdout, GDB received it
stdout ---------------------> Did display it
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with main.c and the launch.json pipeTransport configuration, then inspect the debugger output path for messages received on standard error. Compare the displayed stderr and stdout output, and consider the issue done when stderr from both program execution and the GDB printf command appears in the debug console.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100