Debugging embedded jruby

Are there any options for debugging, especially remote debugging, of
jruby when it runs embedded in java (eg: in an app server). I don’t see
how to use the JRuby Fast Debugger (rdebug and rdebug-ide) except by
launching the ruby script to be debugged directly on the command line.
But I don’t have this option when the ruby script runs within the
context of a webapp in an appserver, or when otherwise embedded.
might help