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

Inspecting variables and evaluating expressions


During the debugging session, IntelliJ IDEA will present the values of the variables in the editor itself, next to the variable usage, as shown in the following screenshot:

While this may be useful as a quick overview for the current state, the Variables tab gives you the opportunity to examine the values of the variables in your application in more detail. When a stack frame is selected in the Frames tab, the Variables tab displays all the variables within its scope, such as method parameters, and local and instance variables. Variable here are listed with their unique internal IDs we mentioned earlier; you can use this ID to define the breakpoint instance filter. Each variable in the tab has a context menu when you right-click on it as shown in the following screenshot:

The Set Value option allows changing the variable value. Inspect, available for fields, local variables, and reference expressions, will display and track its reference in its...