I am setting up remote debugger in IntelliJ on Mac. I followed the template without any modification. Then I click the "Debug xxx" button. It shows
"Error running 'Remote Debugger': Unable to open debugger port (localhost:5005): java.net.ConnectException "Connection refused (Connection refused)""
I checked the following:
- There is no port listening on 5005.
- The firewall is shut off entirely.
- I tried to ping localhost 5005 and the connection is refused.
I am confused. There is no firewall and no port listening. Why the connection is still refused?
cargo.jvmargs
- in here I had to append the commands that allow the app to start in debug mode-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000
. Running then in Terminalsudo lsof -i :8000
confirmed that indeed port 8000 is open, and et violà, I could finally attach the debugger remotely in IntelliJ. – Jericajerichonc -vz 127.0.0.1 5005
throwsnc: connectx to 127.0.0.1 port 5005 (tcp) failed: Connection refused
. It doesn't seem like you need a JVM running in debug mode or there is something else. In fact I did nothing to run it in debug mode before for remote debugging to work previously. – Lamanna