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

Trying to debug minitest #16

Open
tdegrunt opened this issue Jul 13, 2021 · 5 comments
Open

Trying to debug minitest #16

tdegrunt opened this issue Jul 13, 2021 · 5 comments

Comments

@tdegrunt
Copy link

Trying to debug a minitest, using the following configuration.

        {
            "type": "ruby-debug",
            "request": "launch",
            "name": "Debug current test",
            "program": "${workspaceFolder}/bin/rails",
            "programArgs": [
                "test",
                "${relativeFile}:${lineNumber}"
            ],
            "useBundler": false
        }

But basically nothing happens, I see rails starting in the debug console, but the process ends straight away without debugging. Am I doing something wrong? I see threads starting in the call stack. I have "break on raised exceptions" off, because otherwise I'd see all exceptions (caught or not).

Screen Shot 2021-07-13 at 08 36 05

Clicking on "Debug" here doesn't work, as that is tied to the ruby plugin.

I've tried useBundler: true, but that gives the same results.

Debugging using 'rails server', using the following configuration works:

        {
            "type": "ruby-debug",
            "request": "launch",
            "name": "Rails server",
            "program": "${workspaceFolder}/bin/rails",
            "programArgs": [
                "server"
            ],
            "useBundler": false
        }

It quickly ends in: "fatal (exception reentered):" though - in:
/Users/tdegrunt/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/actionpack-6.1.4/lib/action_dispatch/middleware/static.rb:140

@castwide
Copy link
Owner

Does minitest work if you specify an explicit file and line, e.g., instead of "${relativeFile}:${lineNumber}" use "/path/to/test.rb:123"?

@tdegrunt
Copy link
Author

That doesn't work, no. I've also tried without the line-number in the path, just to be sure, but same results.
There's output in the debug console, which I always see (sadly - deprecation warnings).

@castwide
Copy link
Owner

This might be related to how the debugger's process monitor manages threads. I haven't identified a root cause yet, but I'm looking into it.

@tdegrunt
Copy link
Author

If there's anything I can do, please let me know

@jensljungblad
Copy link

I have the same problem. I see two threads appear in the call stack, then disappear immediately. I don't see any output in the debug console though.

Any progress on this?

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

No branches or pull requests

3 participants