Skip to content

Debugger prototype for Ruby #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

osiewicz
Copy link
Contributor

@osiewicz osiewicz commented May 20, 2025

This is a prototype implementation of Ruby debugger implementation, based on existing impl in core Zed. Input is most welcome on what it looks like and all that jazz.
This is based on unreleased version of zed-extension-api.

This is a prototype implementation of Ruby debugger implementation, based on existing impl in core Zed. Input is most welcome on what it looks like and all that jazz.
@cla-bot cla-bot bot added the cla-signed label May 20, 2025
@osiewicz osiewicz marked this pull request as draft May 20, 2025 12:41
@vitallium
Copy link
Collaborator

@osiewicz yes! Awesome, thank you! I can finalize it if you don’t mind. Do you have a release date for the new version of the extension_api crate?

@osiewicz
Copy link
Contributor Author

Yep, feel free to deal with this branch as you see fit. I believe we're gonna cut a new version sometime next week. For local development you can probably get by with a patch on extension_api version.

@vitallium
Copy link
Collaborator

Yep, feel free to deal with this branch as you see fit. I believe we're gonna cut a new version sometime next week. For local development you can probably get by with a patch on extension_api version.

Got it, thanks! I think we should apply the same logic as we did in #37: check the bundle first, then PATH, and fall back to the extension's gem.

@joeldrapper
Copy link
Contributor

I got access to the debugger beta and experimented with the existing Ruby adapter (not the one in this PR). A few issues came up.

First, it doesn’t appear to be using the correct version of Ruby. Even though a cwd is provided, the gem install tries to use the system Ruby (2.6) instead of the local Ruby managed by mise.

I haven’t got past this first issue but looking at the code, I believe it would attempt to run rdbg on this system Ruby too. But even if it changed to the configured cwd directory, it should first try bundle exec rdbg before rdbg because that will use the project’s bundled version of the debug gem.

Finally, it looks like the program command the UI generates is incorrect. I entered bundle exec qt and it produced "$ZED_WORKTREE_ROOT/bundle". This executable doesn’t exist. It needs to just run bundle from the working directory, or if it needs a path, needs to get that by running which bundle from the working directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants