Ability to push debug adapter logs to debug terminal/console
When debugging Ruby code in Zed with the Ruby extension, I only see logs in the DAP panel, and nothing in the console/terminal.
Is it possible to output logs to the console/terminal?
Sorry if this is a stupid question, but I can't find any information about this in the documentation or in the Zed Discord. It seems that the problem is not with Zed, but with my configs or the extension.
Hi. I'm not sure if this is related to Zed itself or rdbg but I will have a look. Thanks!
Hi. I'm not sure if this is related to Zed itself or
rdbgbut I will have a look. Thanks!
Let me know if there is anything I can do to help
I ran into this same issue trying to set up Zed for Ruby development.
I can see console output in the DAP Logs pane but only after the debugging session ends. The first line for me is stderr: DEBUGGER: Disconnected., and after that comes the console output.
Dropping some findings:
- The
debuggem does not natively support redirecting STDOUT/STDERR to DAP. Note, for some reason, that works in VSCode. ~~2. Zed does not capture STDOUT/STDERR either, and both are output to the DAP logs instead.~~
Both findings sound like patches to both upstreams: the debug gem and Zed.
UPD: Zed works just fine.
By making a wonky, hacky patch to the locally installed debug gem, I was able to get STDOUT in the console:
Opened an issue on the debug issue tracker https://github.com/ruby/debug/issues/1160 to get confirmation from the authors first.