I want to add a breakpoint in a class in Eclipse, but I don't have the source code for it. Is it possible to add a breakpoint in it anyway? In my case I really only need to know when a method is called.
(As a side note: does anyone have the source code for j2ee_api_1_3.jar?)
Set breakpoints in source code To set a breakpoint in source code: Click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint.
Click the gutter at the executable line of code where you want to set the breakpoint. Alternatively, place the caret at the line and press Ctrl+F8 .
You can follow the steps below: Run -> View breakpoints -> Add -> Java Method Breakpoints. Class pattern -> full reference of your class (e.g., mypackage. MyClass)
If you open the outline view, you can select a method, right-click and select Toggle Method Breakpoint, this will then break whenever the method is hit.
You may be able to get the sources from Sun's archive download page
As mentioned by Rich, the outline view (available even without sources):
alt text http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.user/images/ref-8.png
allows you to set method breakpoint, that is, provided javac compiled those classes with debug informations, including "Source Code information" (that is the case with J2EE1.4, not sure about J2EE1.3)
The source code of J2EE 1.3 should be available and be included with the download center j2sdkee-1_3_1-win.exe file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With