Stepping into Java sources from JRuby (1.1.6RC1)

Hi,

I'm having a problem testing and seting up IDEA 8 to debug a JRuby project. The current description of my requirements are as follows:

I need a JRuby project, whereby I will bind in some Jars (and sources) in order to be able to step thru the Java code to debug some stuff. So, I've been working on this since yesterday with differing results. I setup the IDE on JRuby 1.1.3 with the gem requirements as mentioned here. http://www.jetbrains.net/devnet/thread/277505.

ruby-debug (0.10.1) ruby-debug-base (0.10.1) ruby-debug-ide (0.2.1)


 



This was moderately successfull in that I could start the debugger by debugging a simple Rails functional test. The highlighting of the breakpoint line did not work tho. And more problematic, I could not step into the java class, the debugger just ran thru and disconnected. So I decided to update everything to the newest versions before contacting you.

My current setup is as follows:
Intellij IDEA 8 (build #9013)
jruby 1.1.6RC1 (ruby 1.8.6 patchlevel 114) (2008-12-03 rev 8263) [i386-java]
Gems:

** LOCAL GEMS ***
actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activerecord-jdbc-adapter (0.9)
activerecord-jdbcmysql-adapter (0.9)
activeresource (2.2.2)
activesupport (2.2.2)
jdbc-mysql (5.0.4)
jruby-openssl (0.3)
rails (2.2.2)
rake (0.8.3)
rspec (1.1.11)
ruby-debug-base (0.10.3.1)
ruby-debug-ide (0.4.4)
sources (0.0.1)

The project is setup as 2 modules, the project SDK is JRuby 1.1.6RC1 which is for the JRoR and the second module is a simple java module which is using JDK 1.5.0_16. In order to bind the Java module into the JRuby project I added a module dependency from the JRuby module to the Java module and linked them.

So, this seems to work as I can run a test, instanciate a true java object and do something with it. Plus there are no obvious errors being reported to me from the IDE.

In the same test tho, when I set a bunch of breakpoints and then right click on the test and select "debug ..." the test just runs thru and the breakpoints are never met. Am I doing this right? Maybe there is some other config to do or something?

I'm not sure if maybe the project structure is incorrect or maybe the gem versions just won't work in this configuration (I'm trying the latest and greatest here).

Would really appreciate any help anyone could give me!!

Many thanks in advance.

Matthew



1 comment
Comment actions Permalink

I'm trying the same thing with IJ 9 RC1: stepping from jruby debugger into java code.
Is there even support to do that? Anyone got this to work?

I just found this post for NetBeans. I wonder if something similar could work with intellij:

http://blogs.sun.com/martink/entry/how_to_debug_from_ruby

0

Please sign in to leave a comment.