Posts

Showing posts with the label debugging

Java | Debugging

Image
In the day-to-day life of a programmer, most of the time is spent in debugging. Writing a code can be easy, but fixing a bug can be a nightmare. The java applications can be debugged to check why application is not behaving as expected.  To debug a Spring boot application we have to start application in debug mode. The Spring boot application we created in last post can be debugged as follows -  Intellij Idea -  Once the application is started you can add debug points in code by double-clicking on desired line. As soon as we hit a request, it can be seen that the code execution stopped where debug is added. We check the variables in the right hand side of debug mode. This is useful to check what value is being set. It also has options to mute debug points if we want to continue with normal execution etc.  Most of the IDEs support the Evaluate function. To check some logic, we can right click on code and select Evaluate Expression option where we can add custom code t...