Wednesday, July 31, 2013

Eclipse Debug: Skip Classes

Debugging in Eclipse is a great tool that I find incredibly handy, but I don't find it very handy how when you try to step into one of your service beans you end up in a Spring, AspectJ, some kind of Hibernate Proxy object, or any other third-party object.

Luckily, it's bothered enough smart people that they've built in functionality to ignore certain classes in eclipse debug mode.  All you need to do is go to Window -> Preferences -> Java -> Debug -> Step Filtering.  Just click the 'Use Step Filters' checkbox and add you're own pesky filters.

I've found these filters to be useful:
$Proxy*
java.*
javax.*
org.apache.*
org.hibernate.*
org.springframework.*
*MethodAccessor
java.lang.ClassLoader
sun.reflect.DelegatingMethodAccessorImpl

But, of course, you should add the classes you're getting stuck on.
Eclipse Debug Step Filters

No comments:

Post a Comment