delve icon indicating copy to clipboard operation
delve copied to clipboard

Redirect if internal console

Open gfszr opened this issue 3 years ago • 1 comments

This PR is currently as draft to better improve implementation and pass tests. This PR partially implements https://github.com/go-delve/delve/issues/3094, by implementing redirection of stdout and stderr to the debug console via DAP's OutputEvent's on Linux.

It partially does so as current debug backend API support receiving a path to a redirected file only, and not a io.Writer as an example. It also supports only the native backend and not other backends.

Achieving full support would require adding a generalized API so that we can pass an io.Writer to the native backend nicely, but this can be done later on and be discussed more, while Linux support can be easily implemented.

gfszr avatar Aug 15 '22 21:08 gfszr

Thank you @aarzilli for the quick reply! 🙂 Added a few comments, will address your comments.

gfszr avatar Aug 16 '22 11:08 gfszr

Is this still being worked on @gfszr ?

derekparker avatar Nov 16 '22 17:11 derekparker

Yes - currently having some difficulties on developing and testing on Windows and macOS, as requested in review.

gfszr avatar Nov 16 '22 17:11 gfszr