Sunday 10 February 2008

Avoid long debug sessions for Java dynamic proxy in Eclipse

Dynamic proxy is a great feature implemented in Java. It is being used in many software packages like Spring Framework. It helps with implementation of delegate or decorator design patterns. To facilitate double dispatch, AOP, duck typing etc. But the fun begins when your Eclipse debug session makes you step through code coming from several entities from within java.lang.reflect.* This not only makes your debug session longer but has the potential to make the whole exercise frustrating. The key to solve this are the Step Filers...

They provide with the means to filter out irrelevant packages or classes from step through paths in your debug session.

Make sure your filters are enabled and include all required classes and packages to be excluded in the debug session.


When you do not want to step to the selected class from the call stack again, simply right click and add to the filter.


You can easily toggle filters on and off.




No comments: