-
Notifications
You must be signed in to change notification settings - Fork 752
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
debugging: redirect flag not working with dlv-dap adapter #2155
Comments
Why doesn't this map cleanly? We talked about this a while back offline and my notes say to just pass the command-line input via debugger.Config in commands.go |
Unlike traditional dlv commands ( On the other hand, I noticed go-delve/delve#2329 is closed and the door to have a long running DAP server is officially shut. So maybe now, it doesn't matter 🤷. BTW I thought we didn't examine this |
I see what you mean. We did this mental exercise with |
I think Redirection of stdin/stdout/stderr can be more frequently used (again, it's like Q. The extension doesn't interpret the relative paths included in the flags. How will they be handled in delve? ( |
Is there a known workaround for this? I mean, for using input redirection while debugging |
--redirect
or-r
flag is ignored indlv dap
which is understandable becausedlv dap
won't know what it will do until the launch/attach request arrives. One option is to launchdlv debug --headless --listen=:12345 -r ...
externally (define in tasks.json) and connect it as a preTask of a launch.json configuration). However, not very convenient.Either
dlv dap
supports stdin/stdout/stderr redirect from launch configuration, ordlv dap
accepts-r
flags and use them for the future request. (drawback: the concept doesn't map cleanly imo), orDiscussed in #2136
Originally posted by mlizd March 24, 2022
Hi,
I want to debug a single
.go
file while performingstdin
andstdout
redirection to external text files. Using thelegacy
debug adapter, I can achieve this by specifying the correspondingdlvFlags
:However, if I try using the
dlv-dap
adapter, the redirection flags seem to be ignored. Is this expected behavior? Am I missing any extra settings to make this scenario work properly with thedlv-dap
adapter?For reference, I am using Go version 1.18 and vscode-go version 0.32.0, running on WSL2.
The text was updated successfully, but these errors were encountered: