Managing breakpoints

There are a couple of breakpoint types in IntelliJ IDEA: the line, exception, field, and method breakpoints. Let's start with the most common type: the line breakpoint.

The line breakpoints are placed on the gutter. We described the gutter in the very first chapter. To position the breakpoint, simply click on the gutter where you want the debugger to stop. You can also use the Ctrl + F8 (PC) or cmd + F8 (Mac) keyboard shortcut. The selected line will be shaded in red and the big red dot on the gutter will represent the breakpoint as shown here:

Managing breakpoints

Tip

Line breakpoints can be set on executable lines only. Comments, declarations, and ...

Get IntelliJ IDEA Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.