From the course: Java 8+ Essential Training: Objects and APIs
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Debug with IntelliJ IDEA - Java Tutorial
From the course: Java 8+ Essential Training: Objects and APIs
Debug with IntelliJ IDEA
- [Instructor] All good integrated development environments for Java provide debugging capabilities. These include the ability to set break points, and to watch variable values, so you can find out where the errors are occurring in your code. A breakpoint suspends your application on a certain line of code. IntelliJ IDEA lets you put in simple breakpoints very easily. I'm going to add a bit of code to this project after creating an array of characters. I'll start by typing "for each", and pressing Tab, or Enter or Return, and that expands into a for-each loop. Within the loop, I'll create a character variable that I'll name "character", and I'll get that value from the char's array. Within the loop, I'll output the current character. And when I run the application, I see each character displayed on its own line. Now, I'd like to suspend the application on the line where I'm outputting the character. I'll click on the trough next to the line number, and that creates a breakpoint. Then,…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.