How to set a breakpoint in Eclipse in a third party library?

boutta picture boutta · Dec 16, 2008 · Viewed 47k times · Source

I'm getting a NullPointerException in a Class from a 3rd party library. Now I'd like to debug the whole thing and I would need to know from which object the class is held. But it seems to me that I cannot set a breakpoint in a Class from a 3rd party.

Does anyone know a way out of my trouble? Of course I'm using Eclipse as my IDE.

Update: the library is open-source.

Answer

Joachim Sauer picture Joachim Sauer · Dec 16, 2008

You can easily set method breakpoints in 3rd party libraries without having the source. Just open the class (you'll get the "i-have-no-source" view). Open the outline, right-click on the method you want and click on Toggle Method Breakpoint to create the method breakpoint.