-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I have a complex monorepo with several different languages - including several concurrent versions of Ruby itself, using asdf as a version manager - and dozens of processes/packages.
I'm using a single multi-root VS Code workspace in this monorepo, and generally speaking, I love it.
Problem: there is no single Ruby app/gem in my workspace! The Ruby Debug extension gets very confused about what the working directory should be, and where my bundle is, and other details.
For Node debugging, I handily solved the problem by introducing a wrapper script that establishes a suitable CWD before invoking node. Then, I created a launch configuration like so:
"type": "node",
"runtimeExecutable": "${fileWorkspaceFolder}/.vscode/wrappers/yarn"
I need a similar escape hatch for Ruby Debug. Your useBundler option is a great start, but it just can't deal with the enormous level of complexity in my project. (I also need to ensure that the right Ruby binary is invoked, too - being that I have several Ruby versions in use).
Solutions Tried So Far
I looked at your source and found out that you support a debugger option that I should be able to use to point to my bash wrapper script. When I try this, my wrapper is never invoked and VS Code tells me:
Debugger exited without connecting (exit code 1)
I looked into ruby-spawn to see if it was the culprit; it is my likeliest suspect and if I have the time, I'll debug this extension and see what the heck is being spawned.