Forum: JRuby Debugging between JRuby and Java

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eccf7c340d29d7994b5427fe481c6e34?d=identicon&s=25 Jonathan O. (jonathan_o)
on 2015-03-06 21:13
I have a large Java project that uses some Ruby scripts (primarily
because of Ruby's support for "yield").  The Ruby code calls Java code
which calls more Ruby code.  It's very interleaved, but everything is
driven from Java.

I'm using embedded jruby-standalone and building a jar-with-dependencies
(via maven).  I'm using a maven plugin to run jrubyc and generate .java
files which maven compiles for me.

When I run the jar-with-dependencies, I can attach my debugger to the
Java process with no problems, but I'd really love to be able to debug
the Ruby code.  Is there a solution for this?

I'm not launching any kind of jruby executable to which I could attach
arguments.  It's embedded in the jar and invoked via java -jar.

(Cross-posted to StackOverflow at
http://stackoverflow.com/questions/28906844/debugg....)
2c0c4cf3ccc8da22f7c3b9586ce1cd70?d=identicon&s=25 Christian MICHON (Guest)
on 2015-03-07 09:09
(Received via mailing list)
Embed pry-remote in your gems and code. You'll be able to debug in
context
remotely.
This topic is locked and can not be replied to.