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.

You need to track calling of methods implemented from java.awt.event.MouseListener in your code.

  1. place editor cursor into the source code implemented MouseListener
  2. invoke New Breakpoint action by Ctrl+Shift+F8 shortcut or by menu Debug > New Brekpoint
  3. select Breakpoint Type Method
  4. textfields Package Name and Class Name should be pre-filed by your code's package/class name
  5. write mouse* to Method Name textfield
  6. select No thread (continue) in Suspend combobox
  7. 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

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo