IntelliJ IDEA 13.1 Web Help

In this section:

Basics

Method breakpoints method_breakpoint let you follow the program flow at the method level.

Creating method breakpoints in the editor

To create a method breakpoint using the editor
  1. Place the caret inside a method, where you want to toggle a method breakpoint.
  2. On the main menu, choose Run | Toggle Method Breakpoint. Method breakpoint appears at the method declaration.

    method_breakpoint_added

    A balloon appears, informing about the possible slow down of the debugging process:

    method_breakpoint_info

Alternatively, just click the left gutter at the method declaration.

Tip

When one sets a breakpoint on a folded method, a line breakpoint is set on the first executable line after method declaration.

Creating method breakpoints using the breakpoints dialog

To create a method breakpoint using the Breakpoints dialog
  1. On the main menu, choose Run | View Breakpoints, or press Ctrl+Shift+F8Ctrl+Shift+F8Ctrl+Shift+8Ctrl+Shift+F8Ctrl+Shift+F8Ctrl+Shift+F8Alt+F9Ctrl+Shift+F8Ctrl+Shift+F8Shift Command F8Shift Command F8Shift Command F8.
  2. In the Breakpoints dialog box that opens, click add.
  3. Select Method Breakpoint from the drop-down list.
  4. In the Add Method Breakpoint dialog box, specify the class name pattern, including the package name, and the name of the desired method.

    So doing, when the debugging session starts, the application will pause in all classes with the names matching the specified pattern, at the specified method.

Deleting method breakpoints

To remove a method breakpoint, do one of the following
  • Click the method breakpoint icon method_breakpoint in the left gutter.
  • On the main menu, choose Run | Toggle Method Breakpoint.

See Also

Concepts:

Reference:

Web Resources: