ruby-debug / ruby-debug-ide

An interface which glues ruby-debug to IDEs like Eclipse (RDT), NetBeans and RubyMine.
https://www.jetbrains.com/ruby/features/ruby_debugger.html
Other
371 stars 83 forks source link

[FEATURE REQUEST] Remote debugging triggered from within a ruby script #191

Open iandol opened 4 years ago

iandol commented 4 years ago

I have a GUI app that runs a script, and I need to debug the script. The GUI does not provide a way to change the interpreter so I cannot run rdebug-ide mycode.rb. Byebug offers a way to remote debug by triggering the debug server from within the ruby code itself. Is there a way to do this with ruby-debug-ide?

iandol commented 2 years ago

It seems this is not currently possible, so I would like to make this a feature request. Thank you!

iandol commented 2 years ago

Note that the new debug gem: https://github.com/ruby/debug handles this perfectly. You can use require 'debug/open_nonstop' and then use binding.break to halt and wait for a connection. Then you can attach from a terminal or even via VS Code. More flexible than forcing code to be run from the debugger and less clunky than byebug.