-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send DAP OutputEvents on stdout/stderr of debugged process when console is internalConsole
#3094
Comments
The problem with this is that some program will behave differently if their stdout/stderr is not a tty. It is unfortunate that DAP was designed like this. |
@aarzilli Yet, other debug adapters do the same, even if running with a tty - debugpy for instance. Moreover, DAP supports |
The specific case in debugpy can be seen here: redirecting = arguments.get("console") == "internalConsole" Redirection is decided in case the user specifies |
internalConsole
I revised the issue to only send such |
This was implemented by #3253 |
Go Version: 1.18
Delve Version: 1.8.2
Current status
DAP allows sending
stdout
/stderr
outputs back to the DAP client, by which it is shown on the debug console of the IDE. Delve spawns the debuggees with its own stdout/stderr, so the output is missing from the normal debug console. This is the desired behavior in case the terminal being used is eitherintegratedTerminal
orexternalTerminal
, but in the case ofinternalConsole
, in order to allow showing the output to the user, clients required to somehow still redirect output (For example, nvim-dap-go).Desired status
Delve would send OutputEvents of data from the debuggee's
stdout
/stderr
if the console given isinternalConsole
, which would allow the DAP client to easily present it.The text was updated successfully, but these errors were encountered: