Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to set breakpoints on all methods of a class?

Is there any way to set breakpoints on all methods of a given class?

I have a huge (2300 lines) legacy class and I need to set breakpoints on all method calls to understand how this mess works.

like image 890
Sergey Senkov Avatar asked Feb 22 '13 15:02

Sergey Senkov


People also ask

How do you put breakpoint on all of the methods in a class?

Press F3 and then press F9 to add a breakpoint.

How do I add a breakpoint to all methods in eclipse?

Select all the methods using ctrl . Right click and select Toggle Method Breakpoint .

How do you set a class breakpoint?

You can set a breakpoint on a class so that the debugger pauses when code from the class is about to be accessed and/or when the class is unloaded from memory. To set a breakpoint on a class: Choose Run | New Breakpoint (Ctrl-Shift-F8).

How do you find all breakpoints?

There is a window called Breakpoints window and after opening that you can see all the breakpoints in the application. To open the breakpoints window: Go to menu Bar > Debug > Windows > Breakpoints click. Or press Ctrl+Alt+B.


1 Answers

You can follow the steps below:

  1. Run -> View breakpoints -> Add -> Java Method Breakpoints

  2. Class pattern -> full reference of your class (e.g., mypackage.MyClass)

  3. Method Name -> * (i.e., asterisk wild card)

Example

like image 185
vtsamis Avatar answered Sep 21 '22 17:09

vtsamis