Configuring IDE Debugging with JavaRebel

March 4th, 2008 by Jevgeni Kabanov

One of the inconveniences that our users frequently report is stepping in/out of the code managed by JavaRebel. However we have found that most IDEs today provide a way to filter out JavaRebel methods and in this article we will show how to configure Eclipse and IDEA to make your debugging as pleasant as ever.

To configure Eclipse go to Window -> Preferences and from there to Java -> Debug -> Step Filtering (or just search for “Step filtering”). Enable step filters and “Filter synthetic methods”. Make sure that “Step through filters” is also on. Now enable all the default filters and add three package ones:

  • RebelMethodAccessor*
  • com.zeroturnaround.*
  • org.zeroturnaround.*

Result should look like this:

In IntelliJ Idea open up debugger properties (File – Settings – Debugger). On the lower left corner of the debugger settings page make the necessary changes. Be sure to tick “Skip synthetic methods” checkbox and add the necessary class filters. See screenshot:

21 Responses to “Configuring IDE Debugging with JavaRebel”

  1. Peter Felbur Says:

    Eclipse is still giving me “Source not found” pages in Java Editor when I try to step into a class (F5). In the call stack I see MyAction.__rebel_accessor__() on top and the class and method I’m trying to step into on the line below.

    This is existing code but was reloaded by Rebel.

  2. Jevgeni Kabanov Says:

    Are you using the latest nightly build? Not everything was marked as synthetic before.

  3. ZeroTurnaround.com » Blog Archive » JavaRebel 1.1 Released Says:

    [...] Improved debugging. No need to step through generated methods anymore, see this article. [...]

  4. James Says:

    Hello, I am running Eclipse 3.4 and JavaRebel 1.2 and I am unable to add the package that results in the availability of “RebelMethodAccessor”. I have com.zeroturnaround.* and org.zeroturnaround.*. Any ideas?

  5. Jevgeni Kabanov Says:

    In 3.4 they refactored this page and now you should use “Add Filter” button and “RebelMethodAccessor*” pattern.

  6. sq Says:

    i have set as you said.
    set breakpoints in java
    but in debugging , eclipse can’t show every variable ’s value…
    e.g
    String hello =”hello Word”;
    String hello2 =”hello Word2″;
    in debugging ,can ‘t show hello ’s value.

    JDK1.5 eclipse3.4 JavaRebel 1.2 tomcat5.5
    can you give any ideas?

  7. Toomas Römer Says:

    We were able to reproduce this. We’ll look into finding a fix. Until then you can use the __REBEL_FIELDS__ field which has the value.

  8. Teo Says:

    What about the integration netbeans-javarebel? At the moment I’m evaluating JavaRebel and it’s a great product, but I have to use the Netbeans 6.1 IDE and we are not able to debug… is there any plugin or workaround to solve / bypass this issue?

  9. Toomas Römer Says:

    Plugin state for NetBeans is quite bad at the moment.

    Once it was an active topic and we did find the solution. It required patching NetBeans but none of the issues that we posted to NetBeans list/buzilla got any responses.

    The best we can do is release the patched jar’s so that users would have to overwrite 2 jar files in their NetBeans installation if they are up to it :)

    Let me know if you’re interested in testing this.

  10. Teo Says:

    Thanks Toomas. I’m interested in testing the patch… Javarebel should significantly improve our productivity so we can’t miss the javarebel funcionality.

    Please, let me know how I can get the patch and the installation steps…

    Big Thanks

  11. Toomas Römer Says:

    Ok, I’ve sent you the build, we can continue this via email.

  12. Martijn Says:

    Any updates on the patch for NetBeans? I am currently using NetBeans 6.5 and would like to debug as well. If you need help testing, please let me know. Thanks!

  13. Toomas Römer Says:

    No updates. The tests did not go too well and our current focus is on 2.0 release.

    See http://www.netbeans.org/issues/show_bug.cgi?id=139047 and http://www.netbeans.org/issues/show_bug.cgi?id=139045 for more details.

  14. Martijn Says:

    Thanks, so you did provide patches – but did these not work as expected or did the guys at netbeans simply not apply them yet?

  15. Toomas Römer Says:

    We did not get any comments. We pinged the mailinglist also if anybody would take a look at the patches and provide a comment if we’ve understood the code correctly. No reaction to the issues or mailinglist post.

  16. Martijn Says:

    I see, that’s a real shame they ignore you. :(

    Do you have the patched version as *.class or *.jar perhaps for netbeans 6.5, I’d love to give it a try to see if it works.

  17. Toomas Römer Says:

    I’ve contacted you through your email address.

  18. Martijn Says:

    Thanks, but nothing has arrived it seems. :/Try this email instead.

  19. Toomas Römer Says:

    Okay, has been sent to the new address. Btw, the previous email was giving “DNS Error: Domain name not found”.

  20. Gerardo Blanco Says:

    Hi,
    I’m trying to use Netbeans 6.5 also.
    Got any responses? Anything that would work with JavaRebel 2.0?

    Thanks!
    Gerardo

  21. Toomas Römer Says:

    No update still.

Leave a Reply