Why is IntelliJ skipping breakpoints when debugging remotely

I was prompted to debug a Java application installed in Apache Karaf (OSGi) running in a virtual machine hosted on my dev machine. A colleague of mine has successfully done remote debugging with Eclipse. My tool of choice is IntelliJ, and in my attempts to debug remotely, IntelliJ connects successfully (via socket). If I pause the debugging session, the Karaf console freezes as expected and resumes when the continue button is pressed. But when I am suspended I see the following message in IntelliJ and my breakpoints are being ignored.

The target virtual machine is not paused by a breakpoint request. Evaluation of methods in this mode is impossible.

What does it mean? I have searched and also looked at the documentation for IntelliJ. Why does Eclipse allow you to work with breakpoints, but IntelliJ does not?

+3


source to share


1 answer


First, it is assumed that you are running the OSGI container (for example Fuse Fabric

) in debug mode. This is often done by adding an argument debug

to the beginning of the script.

For example:

c:\> startfabric.bat debug

      



As Tim pointed out, you just need to make sure that your source code is exactly in sync with what was deployed in the OSGI container.

Of course, make sure the same version of the source code that the server and select Build

Rebuild Project

. If necessary, do mvn clean install

on your machine and deploy the node / function you created yourself - then you know that the code you are locally must match the deployment exactly.

Finally, check your Debug Panels in IntelliJ and remove any Watch expressions that might interfere with debug mode.

+1


source







All Articles