Having trouble debugging single rails minitest file
vmcilwain opened this issue · 2 comments
Hello,
I am attempting to debug a single minitest file in a rails app but I am having some trouble getting the debugger to launch properly.
My current environment is as follows:
macOS: 14.1 (M2 Chip)
rdbg 1.8.0
vscode: 1.84.2 (Universal)
vscode-rdbg: 0.1.0
zsh 5.9 (x86_64-apple-darwin23.0)
My current debug launch config is:
{
"type": "rdbg",
"name": "Debug current file with rdbg",
"request": "launch",
"command": "rails",
"script": "test ${relativeFile}:${lineNumber}",
"args": [],
"askParameters": true,
"env": {
"RUBY_DEBUG_OPEN": true
}
}
The prompt displays the following command for me to execute:
rails test test/models/product_test.rb:22
After confirming, I get the following output in the debug console:
Ruby REPL: You can run any Ruby expression here.
Note that output to the STDOUT/ERR printed on the TERMINAL.
[experimental]
`,COMMAND` runs `COMMAND` debug command (ex: `,info`).
`,help` to list all debug commands.
I am not sure how to verify if the environment variable was set or if it is even useful in this case.
I confirmed the test does run correctly when I copy/paste it in the terminal (warp).
Has anyone managed to get this to work by chance?
What is your question?
BTW why do you use it: "RUBY_DEBUG_OPEN": true
?
Sorry I am just now getting back to this.
I am going to close this ticket and open another one with more details of what I am doing and what I am experiencing if I run into any issues.