Watch this video to learn the basics of the debugging tools available in IntelliJ.
If you want to follow along, Chris is working with ArrayListGradebook
from the Control Flow and Collections chapter
and the HelloMethods and Message from Classes and Objects, Part 2 chapter.
You should have already downloaded this code from the java-web-dev-exercises.
The video is using an older version of IntelliJ.
The overall functionality of the debugging pane is still there, however,
you may have to explore the location of buttons.
We recommend hovering over each icon and looking at the names of each.
Set a breakpoint where you want to pause the execution of the code. This will provide a more detailed look at what the program is doing at this point. Right-click in the text editing window to add a breakpoint to your code.
Run your program in Debug mode
Inspect the values of your variables in the Debugger Pane.
If needed, use the Add/Watch button to watch a specific expression as your program executes.
You can also set a conditional breakpoint to pause the execution of the code when a certain condition is a method.