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

Debug Tests fails with an error #133

Open
grelca opened this issue Jan 17, 2024 · 2 comments
Open

Debug Tests fails with an error #133

grelca opened this issue Jan 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@grelca
Copy link

grelca commented Jan 17, 2024

Your environment

  • vscode-ruby-test-adapter version: 0.9.2
  • Ruby version: 3.1.4
  • VS Code version: 1.85.1
  • Operating System: macOS 14.1.2
  • RSpec or Minitest version: RSpec 3.12

Expected behavior

  1. Run "Debug Tests in Current File"
  2. Tests run with debugger enabled

Actual behavior

  1. Run "Debug Tests in Current File"
  2. Configured debug type "Ruby" is not supported:
Screenshot 2024-01-17 at 4 40 51 PM

Some Googling turns up that the Ruby launch config type is related to the https://marketplace.visualstudio.com/items?itemName=rebornix.Ruby extension which has been deprecated. I did have this extension installed previously and was able to use the debugger feature of this extension, but seems like since the last time I used it the extension's been removed from my system and it's no longer installable.

#127 would help with this by allowing users to set their own launch config

@grelca grelca added the bug Something isn't working label Jan 17, 2024
@danleyden
Copy link

Same issue here... currently my workaround is to use https://github.com/st0012/ruby-lsp-rspec in place of this extension

@moritonal
Copy link

moritonal commented May 20, 2024

I have the same issue ever since I uninstalled the deprecated Ruby extension written by Peng Lv. With a glance I'd say this is likely because of how this line creates a Debug config with the type of "Ruby" which is causing this issue.

    const debuggerConfig = {
      name: "Debug Ruby Tests",
      type: "Ruby",
      request: "attach",
      remoteHost: config.get('debuggerHost') || "127.0.0.1",
      remotePort: config.get('debuggerPort') || "1234",
      remoteWorkspaceRoot: "${workspaceRoot}"
    }

    const testRunPromise = this.run(testsToRun, debuggerConfig);

I don't know what the fix would be, but I know for my current debug setup using Shopify's extensions is

{
            "type": "ruby_lsp",
            "request": "launch",
            "program": "${workspaceRoot}/bin/rails server --port 3008"
}

So it'd be some version of that, although that'd just force-associate us with the Shopify's "ruby_lsp" name, so same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants