| View previous topic :: View next topic |
| Author |
Message |
Stephen Bannasch Posted via mailing list.
|
Posted: Tue Dec 30, 2008 9:35 pm Post subject: running the ruby debugger when I start jruby from a java program? |
|
|
I've learned how to run a jruby program from the console with jruby
and rdebug so that I can attach a NB debugger to the process.
Now I'd like to be able do the same thing when I start one or more
jruby instances from my own Java program.
I can probably take a look at how jruby does it when for example I run this:
jruby --debug -S rdebug-ide -p 7000 --stop -- ar_to_xml.rb
I was just wondering if anyone had already solved this in a simple form.
It would be even cooler to be able to turn debugging on and off
programmatically.
--
- Stephen Bannasch
Concord Consortium, http://www.concord.org |
|
| Back to top |
|
 |
Martin Krauskopf Posted via mailing list.
|
Posted: Mon Jan 05, 2009 11:11 pm Post subject: running the ruby debugger when I start jruby from a java program? |
|
|
Stephen Bannasch wrote:
| Quote: | I've learned how to run a jruby program from the console with jruby and
rdebug so that I can attach a NB debugger to the process.
Now I'd like to be able do the same thing when I start one or more jruby
instances from my own Java program.
I can probably take a look at how jruby does it when for example I run
this:
jruby --debug -S rdebug-ide -p 7000 --stop -- ar_to_xml.rb
I was just wondering if anyone had already solved this in a simple form.
|
Not sure about your concrete use-case, but simplest is to use
ProcessBuilder. This what NetBeans does when starting 'local' debugger
session.
| Quote: | It would be even cooler to be able to turn debugging on and off
programmatically.
|
This needs to be done in the ruby-debug-ide[1] gem, so it will be
possible to call something I described in the blog[2]:
if something_peculiar_has_happened
require 'ruby-debug-ide'
debugger(7000) # 7000 being a port
end
m.
[1] https://rubyforge.org/projects/debug-commons/
[2] http://blogs.sun.com/martink/entry/remote_debugging_debug_whatever_ruby |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|
|
|