vscode-rdbg
vscode-rdbg copied to clipboard
Feature Request: Launch-then-attach Launch Configuration
The launch configuration is very useful for starting a new process and debugging it. But it currently requires the process to be launched via rdbg
. The attach configuration is more flexible, in that whatever hoops you need to jump through to get the process started are outside of the extension's purview (running inside of docker, via an optimized launcher like spring
, etc.) - it just needs to know how to connect to it. I'd love to be able to use the best of both worlds... a "launch" config with something like "bareCommand": true
that doesn't wrap the command in rdbg
, and then remotely attaches once the socket/port is available.
For now I'm working around this by setting rdbgPath to a custom script that doesn't actually launch rdbg, but does capture the arguments to it and passes them through the process launch, and then when the process is running it requires rdbg itself.
I'm in the same boat (do all my dev work in containers). I just want to attach to a container that I launched with whatever command I choose.
@ccutrer I would love to see the script you wrote to work around this!
I'm in the same boat (do all my dev work in containers). I just want to attach to a container that I launched with whatever command I choose.
@ccutrer I would love to see the script you wrote to work around this!
Me too!
I got something working, based on @ccutrer's idea of custom script that rdbgPath points to:
https://gist.github.com/machty/7e08afc32e1a82c60a85141afdf84ebd
With this, I can run the launch command "Run rspec at current line", and it'll spin up rspec via the springified rspec binstub I'm in the habit of using. So as far as I can tell, this is the best of both all worlds: 1. fast string of rspec via spring, 2. rdbg (rather than binding.pry)
@machty That's nice - but it doesn't solve the issue of firing up a container and attaching to it - does it?