Answer the question
In order to leave comments, you need to log in
How to properly use Attach to process in intellij idea?
Good afternoon!
There is a servlet project that I run for debugging via jetty.
There is a plugin project in the form of jar. The plugin (class) is loaded via URLClassLoader in the servlet and accepts calls from the servlet.
I would like to catch breakpoints in a plugin project.
To do this, from the plugin project, I connect via Attach to process to the servlet process and select the process:
At the same time, in variables, I see the message
Target VM is not paused by breakpoint request. Evaluation of methods is not possible in this mode
When calling plugin methods from a servlet, I don't catch breakpoints in the plugin project.
What am I doing wrong?
Answer the question
In order to leave comments, you need to log in
If you are running Jetty not from inside IDEA, but as a separate application and then connecting to it, then first of all check that you have enabled Remote Debug in Jetty.
Next, make sure you have the same plugin code on the server and in the idea. Greatly simplifying, with remote debug, the IDE tells the server to stop execution when you reach line N in class X. Accordingly, if one code is running on the server, and another code is open in the IDE, then there may not be class X on the server, or string N can be a no-op (empty string or opening/closing parenthesis) because some method was changed or a comment was changed somewhere, causing the lines to move down compared to the code on the server.
I'll put it in this
The openvpn client adds routes to the routing table, which requires admin rights.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question