The video demonstrates debugging a Spring Boot to-do app in Visual Studio Code by setting breakpoints, inspecting variables, and stepping through controller and service methods to trace request handling and object creation. It also showcases runtime inspection features like endpoint mappings, health checks via Spring Boot Actuator, live memory monitoring, and clean application shutdown, highlighting how these tools aid in understanding and debugging Spring Boot applications effectively.
The video begins by exploring what happens between a browser click and the Java code that processes it, using a sample to-do app built with Spring Boot. The app’s web form sends a title to a controller, and the demonstration requires a Java Development Kit along with the Extension Pack for Java and Spring Boot Extension Pack installed in Visual Studio Code. The focus is on the to-do controller, where a breakpoint is set at the point the controller passes the title to the shared service, allowing the viewer to pause and inspect the request mid-execution.
Using the Spring Boot dashboard in Visual Studio Code, the presenter starts the application in debug mode and waits for the debugger to connect. The dashboard provides useful features such as endpoint mappings and a memory section that appears only when a live process is attached. The controller methods display gray URL hints, which are used to send a request that hits the breakpoint. When the request pauses, the local variables are inspected to confirm the title received by the controller matches the input from the web form.
The debugging session continues by stepping into the service method that handles adding the to-do item. The presenter observes the creation of the to-do object, noting that its ID is initially null and is assigned later by the repository during the save operation. After stepping through the service method and returning to the controller, the newly assigned ID is confirmed, which is used for subsequent actions like toggling or deleting the to-do item. The request then continues, with the controller redirecting and the server-side template engine rendering the updated list in the browser.
Next, the video demonstrates runtime inspection features available in the Spring Boot dashboard. The endpoint mapping view is expanded to show all endpoints, including those added by Spring Boot Actuator, which provides health and monitoring endpoints. By opening the Actuator Health endpoint in the browser, the current health status of the running application is confirmed. Additionally, the memory section in the dashboard displays live heap information, updating continuously while the app runs under the debugger, offering insights into the application’s resource usage.
Finally, the video wraps up by showing how to cleanly shut down the running application by killing its terminal in Visual Studio Code, which stops the Java process and frees up the port. The dashboard reflects the stopped state by clearing the running indicator. Overall, the demonstration highlights how Visual Studio Code, combined with Spring Boot tools, enables developers to trace requests, inspect live variables, monitor application health, and observe memory usage in real time, providing a powerful way to debug and understand Spring Boot applications.