Skip to content

Trying to debug minitest #16

@tdegrunt

Description

@tdegrunt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions