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.
Press F3 and then press F9 to add a breakpoint.
Select all the methods using ctrl . Right click and select Toggle Method 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).
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.
You can follow the steps below:
Run -> View breakpoints -> Add -> Java Method Breakpoints
Class pattern -> full reference of your class (e.g., mypackage.MyClass)
Method Name -> * (i.e., asterisk wild card)
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