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.
Terminate a debugger sessionClick the Stop button in the Debug tool window. Alternatively, press Ctrl+F2 and select the process to terminate (if there are two or more of them).
To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.
Ctrl + F8 (Mac: Cmd + F8) Toggle breakpoint.
Debugger performance can be affected by the following: Method breakpoints will slow down debugger a lot because of the JVM design, they are expensive to evaluate. Remove method breakpoints and consider using the regular line breakpoints. To verify that you don't have any method breakpoints open .
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With