-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Currently the extension is unable to use a system-installed rdbg due to not finding it in the path.
The relevant log entry:
2025-10-21T23:36:33+01:00 ERROR [debugger_ui::debugger_panel] failed to start debug adapter.: failed to spawn command `cd "/mnt/dev/projects/rbplayground" && <...snip...> ZED_ENVIRONMENT="worktree-shell" ZED_FORCE_CLI_MODE="" _="/usr/lib/zed/zed-editor" "/home/XXXX/.local/share/zed/extensions/work/ruby/bin/rdbg" "--host=2130706433" "--port=36803" "--open" "--stop-at-load" "/mnt/dev/projects/rbplayground/info-converter.rb" "--"`: No such file or directory (os error 2)
Confirmed rdbg is in the path (from inside zed terminal):
$ which rdbg
/home/XXXX/.local/share/gem/ruby/3.4.0/bin/rdbg
$ rdbg --version
rdbg 1.11.0I hope you don't mind but, i was particularly bored tonight, so i cloned a copy of the extension, and added a few println's around get_dap_binary so i could try and see what was happening, the result:
[RUBY-EXT]: --- entering get_dap_binary
[RUBY-EXT]: rdbg_path = rdbg/rdbg
[RUBY-EXT]: worktree.which(&rdbg_path) was none!
[RUBY-EXT]: --- leaving get_dap_binary
[RUBY-EXT]: rdbg_path - /home/XXXX/.local/share/zed/extensions/work/ruby/bin/rdbg
[RUBY-EXT]: cwd - Some(/mnt/dev/projects/rbplayground)
i noticed immediately, it appears to be searching for rdbg/rdbg instead of rdbg, and indeed removing the .join() statement in ruby.rs/Line#137 fixes it.
As a temporary workaround, a simple symlink solves it for the time being.
Debug Config
{
"label": "Debug active Ruby file",
"adapter": "rdbg",
"request": "launch",
"script": "$ZED_FILE", # same error if i hard-code the path to a script
"cwd": "$ZED_WORKTREE_ROOT"
}Specs
Zed: 0.208.6
OS: ArchLinux [Kernel 6.17.3] x86_64
Ruby: 3.4.7 (2025-10-08 revision 7a5688e2a2) +PRISM [built from source & managed by mise]
rdbg: 1.11.0 (non-gem, included with ruby)
mise: 2025.10.10