[IDEA PLUGIN][ GenericDebuggerRunner ] How to Attach debuger with delay - after process have initialized


Hello all.

I have a RUN plugin that extends GenericDebuggerRunner.

The problem i have is that my application debug port gets exposed only after about 10 about seconds due to some internal routines.

Meanwhile the Debug session is already open and showing "connnecting to the targer VM, address: ...", transport: socket.

So I get a deadlock, where both the debugger and processes are waiting for connection, but never establish it.


Is there a way to delay the debugger start after the application had started ?

I've checked attachVirtualMachine and creation of XDebuggerManager, but either seems to help with my issue.

Thank you.


Hi, I'm not sure I understand why the deadlock is happening. On debug IDEA starts listening for a connection from the started app (it can happen some time later - that's fine). Check that your RemoteConnection is in server mode, so that it does connect from the app to the IDEA, not in the opposite direction.


My bet,

I found the issue - it was in local logic. Application was exposing debug port on both localhost and remote machine.

I was connecting to a wrong one, which caused for both debugger and application to wait.


Thank you for answers.


Please sign in to leave a comment.