-
Notifications
You must be signed in to change notification settings - Fork 83
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
Do not kill the Ruby process when IDE debugger session disconnects #199
Comments
I'd like this feature as well. I'm not a maintainer or anything, but I've been noodling around the code recently and can point you in the right direction. Here's the bit of code that handles the Commands are sent over a socket from the IDE to I'd imagine any solution to prevent |
@TSMMark what version of the gem used? |
@hurricup latest. |
In my quick local testing, it looks like simply removing the
The same Ruby process can later be reattached to the debugger and everything. I'll try to submit a PR asap that optionally skips the |
For the future googlers, here's my patch until the PR is merged: $ cat bin/rdebug-ide
#!/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
require "ruby-debug-ide"
Debugger::QuitCommand.prepend(
Module.new {
def execute
# NOTE: We must ensure that all breakpoints are cleared before disconnecting sessions,
# or you'll face a `closed stream` error.
Debugger.breakpoints.clear
@printer.print_msg("finished")
end
}
)
load Gem.bin_path("ruby-debug-ide", "rdebug-ide") Usage: $ bin/rdebug-ide [same arguments as the original ones] |
See https://instructure.atlassian.net/l/cp/nefWMv5k for debugging setup. RubyGems version of rdebug-ide has a bug (behavior?) where it will terminate the debugged process when you disconnect it. Credit to ruby-debug/ruby-debug-ide#199 (comment) for the workaround. flag=none test plan - set up VS Code IDE debugging per instructions in the Confluence link above - start debugging - detach your debugger * Web container should still be running and Canvas should still work Change-Id: Ifc7c6376dde2a4f23d709f9d32076fc45a0e1483 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/302228 Tested-by: Service Cloud Jenkins <[email protected]> Reviewed-by: Jake Oeding <[email protected]> QA-Review: Jon Scheiding <[email protected]> Product-Review: Jon Scheiding <[email protected]> Build-Review: Aaron Ogata <[email protected]>
When my IDE disconnects from the debug session, it kills the main process – the process started by
rdebug-ide
command. How to avoid this?If this is not supported already, I would be happy to try to implement a CLI flag for this if given a pointer or two in the right direction.
I scoured this repo for a way to do this or an open issue but couldn't find anything.
--disable-int-handler
sounded like it might do it, but has no effect. Sorry if this is a duplicate issue!The text was updated successfully, but these errors were encountered: