javaVSCode icon indicating copy to clipboard operation
javaVSCode copied to clipboard

Failed to launch if the java process doesn't print the "Listening for transport..." message

Open dueckminor opened this issue 7 years ago • 4 comments

I sometime have to use a special JVM which doesn't print the "Listening for transport dt_socket at address: ..." message.

This makes it impossible to "launch" a java process, while "attach" works without problems. (jdb.ts waits for this message before it sends the run command to the suspended java process)

Do you think it makes sense to add a configuration parameters which allows to "launch" java processes with such an JVM?

If yes, I could implement it and create a pull request for it.

dueckminor avatar Jul 21 '17 11:07 dueckminor

Do you mean this line https://github.com/DonJayamanne/javaVSCode/blob/master/src/client/jdb.ts#L263?

If such changes don't affect current behavior for common JVM then I think could exist a configuration like listenerMessage or something.

faustinoaq avatar Jul 21 '17 11:07 faustinoaq

Yes, I mean this line. The problem is that my special JVM just outputs nothing. A solution would be:

  • if listenerMessage is not configured wait for "Listening for transport"
  • if listenerMessage is a configured text, wait for this text
  • if listenerMessage is a configured as null, don't wait, just try to attach to the port

dueckminor avatar Jul 21 '17 12:07 dueckminor

I think your solution would be good.

BTW, Can I know what JVM are you using? :sweat_smile:

faustinoaq avatar Jul 21 '17 12:07 faustinoaq

Hi Faustino,

I'm using the SAPJVM. Give me some time to create the required fix. I'm currently on vacation and try to touch my notebook as less as possible ;-)

dueckminor avatar Jul 24 '17 18:07 dueckminor