1. Overview

In this article, We will see how to debug spring boot application in IntelliJ step by step. We have seen so many developers who are not practicing to debug the application, Instead of start debugging they are writing system.out.println  and trace application. It’s good practice to debug code using IDE which will make development easy and fast.

2. Step to debug Spring boot application in IntelliJ

Step 1: Open or Create Application

We are assuming that you have created a spring boot application:

spring boot application debug in IntelliJ

spring boot application debug in IntelliJ

Step 2: Put Debug Points

  1. Open Java file in which we want to debug
  2. Put debug point, We can also put multiple debug points.
Spring boot file put debug point

Spring boot file put debug point

Step 3. Start application in debug mode

In IntelliJ, We can start the application in debug mode using two ways:

spring boot application debug in IntelliJ - Run application

spring boot application debug in IntelliJ – Run application

Step 4: Let’s debug code

To debug code, Let’s fire http://localhost:8282/demo in the browser because we have put debug point in demo controller.

When control comes to debug point execution of code will stop and wait for user input:

spring boot application debug in IntelliJ - Debug code

spring boot application debug in IntelliJ – Debug code

3. References

 

Was this post helpful?
Let us know, if you liked the post. Only in this way, we can improve us.
Yes
No

Leave a Reply

Your email address will not be published. Required fields are marked *