Break point not working with maven/tomcat project

Answered

I tried System.out.println(XXX) and set breakpoint to debug backend java code.

However, the breakpoints that are supposed to be hit are never hit and  System.out.println is never printed out (or print out somewhere I do not know).

For example, I wrote some code in a jsp file to show prior pregnancy records in database and it did show that information on the web. However, the break point I set there is never hit.


I am running the project via the IntelliJ IDEA run/debug configuration as shown in the following snapshot:


And I did start the project through the "Debug" icon. However, the breakpoints that should definitely be hit is not hit and I do not where the System.out.println(XXX) are printed to. This cause me a lot of trouble debugging back-end code for the web application. Any help?

1
1 comment

>However, the breakpoints that are supposed to be hit are never hit and  System.out.println is never printed out (or print out somewhere I do not know).

The system out should appear on the Server tab in Debug tool window when this code gets executed. Double check that this code is actually executed.

The screenshot shows the warning that IDE reports, see this clarification about when it is reported. Could be that the port is already occupied by some other process. E.g. there could be that another instance of Tomcat is already running. Try restarting the PC, make sure the ports are not blocked.

0

Please sign in to leave a comment.