Application prints "Listening for transport dt_socket at address: 5005" and does not halt

MiamiBeach :

I start code execution with the typical arguments:

java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 myPackage.myMainClassname

Application starts, prints "Listening for transport dt_socket at address: 5005" and... goes further! Without any attempt to wait for connection. I CAN connect to it during execution and debugging itself works. But why does the application not wait for connection from debugger?

Looks like something is broken in my configuration, but I cannot figure out the root cause. I tried several ways to specify debug settings, different ports, run as administrator, turn off firewalls - nothing helps.

Alexandar Petrov :

You need to specify suspend=y if you want it to wait for connection. Your debugging is working. If you try to connect you will be able to. Most probably you are just used to using suspend=y which blocks until the connection is established.

The behavior is expected when suspend=n.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=455601&siteId=1