IntelliJ debugger not stopping at breakpoints after local server endpoint is already hit once

Viewed 3286

Verison Used : IntelliJ IDEA 2020.1.1 (Ultimate Edition)

Deployed application on local tomcat server and debugging by locally hitting the service endpoint through postman. Able to stop thread at breakpoint only for the first time the endpoint is hit. After that IntelliJ just ignores the breakpoint and I receive the response without stopping at any breakpoint. Debug point appears as ticked which means verified-line-breakpoint, still the thread doesn't suspend at breakpoint. Have restart the server for debugger to stop at breakpoints.enter image description here

1 Answers

Got the solution to this issue. While debugging, in order to stop at next breakpoint use "Resume" instead of "Run to cursor". Though for the first API endpoint hit, both these options do the same job but if we want to stop at breakpoint for the 2nd API hit as well, it won't work if "Run to cursor" is used for resuming thread. In that case, we will have to start local server again for application to stop at breakpoint which is frustrating. Adding screenshot for a demo program.

enter image description here

Related