Book Image

IntelliJ IDEA Essentials

By : Jaroslaw Krochmalski
Book Image

IntelliJ IDEA Essentials

By: Jaroslaw Krochmalski

Overview of this book

Table of Contents (17 chapters)
IntelliJ IDEA Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

Tip

Line breakpoints can be set on executable lines only. Comments, declarations, and blank lines are not suitable locations for line breakpoints.

Another type of breakpoint is the method breakpoint; it lets you follow the program flow at the method level. To set the breakpoint on the method, just click on the gutter near the method signature as shown in the following screenshot:

Be warned, however, that the method breakpoint will...