Skip to content
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

Support debug gem #118

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

tomoasleep
Copy link

This PR enables debug tests with debug gem by using vscode-rdbg extension. (debug gem is bundled with Ruby 3.1+)

Users can choose which debugger to use by rubyTestExplorer.debugger configuration. (rdebug-ide or rdbg)

Example

image

@@ -192,7 +189,8 @@ export class RspecTests extends Tests {
this.log.info(`Running test file: ${testFile}`);
const spawnArgs: childProcess.SpawnOptions = {
cwd: this.workspace.uri.fsPath,
shell: true
shell: true,
env: this.getProcessEnv()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes a bug that debug fails (due to lack of EXT_DIR environment variable).

@connorshea
Copy link
Owner

Thank you! My biggest concern with merging this right now would be the merge conflicts/issues it may cause with the rewrite in #90. I may ask that we wait until that's merged, or to rebase this PR on top of that one.

@Tabby
Copy link

Tabby commented Mar 30, 2023

This isn't a particularly big PR, so it shouldn't be too much work to incorporate it into the rewrite if you want to get it merged, and I'd be happy to do so :)

@tomoasleep
Copy link
Author

Thank you! I'll try to make another patch based on #90.

@@ -141,6 +141,20 @@
},
"scope": "resource"
},
"rubyTestExplorer.debugger": {
"description": "Which debugger to use. `rdebug-ide` or `rdbg`.",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be markdownDescription given the use of backticks, otherwise they won't be rendered nicely

Suggested change
"description": "Which debugger to use. `rdebug-ide` or `rdbg`.",
"markdownDescription": "Which debugger to use. `rdebug-ide` or `rdbg`.",

Copy link

@mikekosulin mikekosulin May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also need to add ruby_lsp
https://github.com/Shopify/ruby-lsp

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

Successfully merging this pull request may close these issues.

4 participants