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.