About idea debug not being able to enter breakpoints

I encountered this problem a long time ago, but I didn’t record it carefully at the time. As a result, when I encountered this problem again after a long time, it took a long time to find the real problem, so I plan to post it here. record it. Of course, the issues covered in this blog may not be suitable for the problems you encounter, and I apologize for that.
As a newbie, the road is always bumpy. Today I encountered the following problem:
insert image description herewhen debugging, the above code skipped directly and did not enter the breakpoint. In order to verify, I specially added an output statement at the top and found the console code. There is no corresponding output statement. It is certain that the above code has not been executed, which means that my debugging may not have gone wrong. Accordingly, I wrote a HelloServlet and hello.jsp in the same project and continued debugging:
insert image description hereI found that I have entered breakpoint debugging, so I am sure that those debugging methods on the Internet that cannot enter breakpoints are not suitable for me. My debugging is normal, and the error should be the code. After careful investigation, it is best to find that I want to debug The methods in which those statements were located were not called , so debug could not be entered, which was really embarrassing. After recompiling, the problem was indeed solved.

Guess you like

Origin blog.csdn.net/qq_42740899/article/details/87869990