Missing DAP OutputEvents for debuggee stdout/stderr
还没有人认领这个 Issue。
评估
调研方向
Reproduce the issue with the linked rdbg-stdout-issue example in Zed and inspect the DAP logs while running test.rb. Read the debug gem's DAP output handling and compare it with vscode-rdbg's extension.ts around line 994. Done means stdout and stderr appear in the Debug Console as OutputEvents with stdout and stderr categories, including output after the breakpoint.
由索引模型根据 Issue 内容生成。
描述
Your environment
ruby -v:ruby 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [arm64-darwin25]rdbg -v:rdbg 1.11.0
Describe the bug
When debugging a Ruby program with rdbg via DAP, the debuggee's stdout and stderr output is not sent as DAP OutputEvents. Instead, the output appears to be passed through to rdbg own stdout/stderr streams, which prevents it from viewing in the Debug Console of DAP clients that don't implement workarounds.
To Reproduce
The easiest way to reproduce is to debug any Ruby file with Zed (with installed Ruby extension):
I've created a small repo with an example: https://github.com/vitallium/rdbg-stdout-issue
Steps:
- Clone the repo
- Install gems with
bundle install - Open in Zed
- Open
test.rbfile - Press F4 to start the debugging session, and in the popup choose
Debug file - Continue execution till the end.
According to the Debug Adapter Protocol specification, debug adapters should capture the debuggee's output streams and send them as OutputEvents with appropriate categories stdout and stderr
When a Ruby program prints to stdout/stderr, rdbg should send OutputEvent messages like:
{
"type": "event",
"event": "output",
"body": {
"category": "stdout",
"output": "Hello from stdout\n"
}
}
Expected behavior
The Console panel should print: Hello from stdout, Hello from stderr and After breakpoint when the execution continues. Currently, rdbg does not send these OutputEvents. The debuggee's stdout/stderr is passed through to rdbg own stdout/stderr streams, which can be seen in adapter logs but not in the Debug Console. You can check that by opening the DAP logs in Zed via the command palette dev: open debug adapter logs.
Additional context
The vscode-rdbg extension actually does that: https://github.com/ruby/vscode-rdbg/blob/master/src/extension.ts#L994
I think I can work on a fix if you consider this an issue (or a feature request) with the debug gem. Thanks!
- 主要语言
- Ruby
- 星标
- 1.3k
- 派生
- 146
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ruby/debug 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP 未关闭
难度 4/5 3-5 天 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 45/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 45/100
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 90/100
-
难度 2/5 1-3 小时 新手友好度 88/100
-
バグ
难度 1/5 1 小时以内 新手友好度 92/100
-
难度 2/5 1-3 小时 新手友好度 75/100
voxpupuli/puppet-epel#186 · 1 条评论 ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) 未关闭Bug Frontend
难度 2/5 1-3 小时 新手友好度 78/100