Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 533
Neha Ranjan Avatar asked May 10 '20 14:05

Neha Ranjan


People also ask

How do I stop debugging in IntelliJ?

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).

How do I stop a debugging session?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.

How do I skip a breakpoint in IntelliJ?

Ctrl + F8 (Mac: Cmd + F8) Toggle breakpoint.

Why is IntelliJ debugger so slow?

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 .


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

like image 126
Neha Ranjan Avatar answered Oct 24 '22 07:10

Neha Ranjan