From the course: Java 8 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Debugging with IntelliJ IDEA

Debugging with IntelliJ IDEA - Java Tutorial

From the course: Java 8 Essential Training

Start my 1-month free trial

Debugging with IntelliJ IDEA

- All good integrated development environments for Java provide debugging capabilities. The ability to set break points and to watch variable values so that you can find out where errors are occurring in your code. I'll demonstrate how to do this in IntelliJ IDEA in the debugging project. This project has just a few lines of code. I'm declaring a string value. I'm then getting a character array from the string. And then I'm stepping through the character array using a for loop and I'm outputting one character at a time. When I run the application, I see the string displayed vertically. One character per line. But now, I'm going to step through the code one line at a time. I'm going to add a break point. I'll click once, to the right of my line numbers, if they're displayed, but to the left of the code. And I see a break point icon displayed. If I move the cursor off the icon and then back again, I'll see some useful information about it. Now, to run the code and hit the break point…

Contents