Debugging Tomcat does not stop at breakpoints

Answered

I run Tomcat from IDEA run config, using an artifact configured within IDEA. I have breakpoints set. When running in debug mode, it never stops at the breakpoints. Standard processes started from main method do stop at breakpoints. I don't have breakpoints muted.

I saw this with 2020 and 2018 versions of Intellij.

Tomcat: 8.5.15

Java: 1.8.0_181

 

This used to work for years with the same code, same run config back when I was running Intellij 2018 or earlier and Tomcat 8.0. However, I can't run that combination anymore to prove it still works because I get some new error regarding loading a jar file and annotations.

5 comments
Comment actions Permalink

What's the specific error? Could you please share a sample project and provide the exact steps to reproduce the issue?

0
Comment actions Permalink

There is no error. It just doesn't stop at the breakpoint.

 

It would not be feasible to provide a sample project for a Tomcat CXF soap service that is sharable. Breakpoints work for basic simple java code. I wouldn't even know where to begin to create a sample project using CXF soap and tomcat. If there is no other way to analyze this, I'll have to consider switching to Eclipse. This is an urgent issue for us.

0
Comment actions Permalink

You can try checking the Java Debugger logs to see if there anything reported: https://intellij-support.jetbrains.com/hc/en-us/articles/207241125 .

Make sure the code on the server corresponds to the sources in the IDE. There could be some jar deployed with the different code version that overrides your sources.

0
Comment actions Permalink

I'm experiencing the same problem,

In my case it's very frustrating because I come from Eclipse, hoping to find a better support for debbuging. After spending days configuring and trying to figure out how to work with IntelliJ, now I find that debug support is buggy :(.

It's not that it never stops on breakpoints, but that maybe in half of debugging session attempts it works, and doesn't on the other half. Very frustrating, because, as you may understand, you have to wait a considerable amount of time until the server starts.

Oh, and another issue, not exactly the same but probably related, is that when I run/debug, I always get a dialog stating that "Cannot open URL. Please check this URL is correct:", with the one I specified in the run configuration, which, of course, if I copy&paste on my browser, works.

0
Comment actions Permalink

A sample project to reproduce would be appreciated: https://uploads.jetbrains.com.

0

Please sign in to leave a comment.