Creating Line Breakpoints
In this section:
- Basics
- Creating line breakpoints in the editor
- Creating temporary line breakpoints
- Creating line breakpoints using the Breakpoints dialog box
- Deleting line breakpoints
Basics
A line breakpoint is a breakpoint assigned to a specific line in the source code.
Line breakpoints can be set on executable lines. Comments, declarations and empty lines are not valid locations for the line breakpoints.
Creating line breakpoints in the editor
Important notes
- For the lambda expressions, you can set multiple breakpoints within a single line.
To do this, click the left gutter area at a line where you want to set a breakpoint. A drop-down
list will appear where you can select which method(s) you want to set a breakpoint at:
IntelliJ IDEA highlights each of the lambda expressions as you move the mouse over the options.
- If you want to set a line breakpoint in the default class constructor, it is enough to set
a line breakpoint on the first line of this class, since the default constructor is mapped to it:
class A { // set a breakpoint on this line }
- When one sets a breakpoint on a folded method, a line breakpoint is set on the first executable line after method declaration.
Creating temporary line breakpoints
Creating line breakpoints using the Breakpoints dialog box
- In the Breakpoints dialog box, click .
- From the drop-down list, select the type of breakpoint:
Deleting line breakpoints
Do one of he following:
- In the Breakpoints dialog box, select the desired line breakpoint, and click .
- In the editor, locate the line with the line breakpoint to be deleted, and click its icon in the left gutter.
- Place caret on the desired line and press Ctrl+F8.
See Also
Reference:
Concepts:
Last modified: 13 July 2016