FaqDebuggingMethodBreakpoint
Method breakpoints
Debugger hits method breakpoint when selected method's body is entered.
Method breakpoints are mostly used to track calling of a set of methods due to possibility to use wildcards in method, class or package names.
Example:
You need to track calling of methods implemented from java.awt.event.MouseListener in your code.
Steps:
- place editor cursor into the source code implemented MouseListener
- invoke New Breakpoint action by Ctrl+Shift+F8 shortcut or by menu Debug > New Brekpoint
- select Breakpoint Type Method
- textfields Package Name and Class Name should be pre-filed by your code's package/class name
- write mouse* to Method Name textfield
- select No thread (continue) in Suspend combobox
- confirm the dialog
- Each calling of the implemented methods will be reported in Debugger Console output after debugging will be started.
The wildcard '*' can be used in Class, Package and Method Name textfields.
Method name <init> means all constructors.
Applies to: NetBeans 6.x
Platforms: All
