0

Can I attach my eclise or Intellij Debugger to an already running remote application?

PS - I know how to remotely debug. But the key part here is that the application is already running and I don't know if the debug port was opened or not. And assuming that it wasn't, can anything be done about it? Or do I have to restart the application?

Just so the readers know, I have already gone through this post and even though the answer is accepted, it doesn't answer my question.

vamosromil
  • 23
  • 6
  • 1
    Starting the app with debug options is required. – CrazyCoder Jul 06 '17 at 23:09
  • @CrazyCoder Are you sure about that? Because it looks like a delimitation to me. These would need a restart of my production app. What I had in mind was that I could debug probably a single thread and it wouldn't impact other users which are not using the resources used by that thread. Take a look at mko's answer for now. – vamosromil Aug 14 '17 at 07:55
  • Yes, I'm pretty sure that you can't get the full featured debugging without restarting the app with the debug options. – CrazyCoder Aug 14 '17 at 13:22

1 Answers1

0

You can attach debugger to running JVM process (that was not started with debug parameters) but you will have very limited options while in debug session.

Take a look here:

https://docs.oracle.com/javase/8/docs/technotes/guides/jpda/conninv.html

SA PID Attaching Connector

Oo.oO
  • 12,464
  • 3
  • 23
  • 45