javadebuggingintellij-idea

Handshake failed - connection prematurally closed error when debugging Solr in Intellij


So i was going to debug my Solr filter plugins on Intellij Community Edition. After i ran the program from comand prompt with this command

java -jar start.jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8983

I started my Intellij debugger with this config:

Transport : socket
Debugger mode : attach
Host : localhost
Port : 8983

But when I ran the debugger I got this error:

Error running Debugger: Unable to open debugger port (localhost:8983): 
java.io.IOException "handshake failed - connection prematurally closed"

Any idea how to fix this?


Solution

  • It should be something like this,

    java "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8983" -jar start.jar

    it's working now