Missing DAP OutputEvents for debuggee stdout/stderr
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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!
- Ngôn ngữ chính
- Ruby
- Star
- 1.3k
- Fork
- 146
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/debug
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
-
Support exceptionOptions in setExceptionBreakpoints to catch arbitrary exception classes via DAP Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
バグ
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Version bump for OpenVox 9 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
voxpupuli/puppet-epel#186 · 1 bình luận ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) Đang mởBug Frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100