title: Unable to open debugger port through IntelliJ
body: <p>I've got a server running on DigitalOcean and a JAR file that I want to debug. I first start the JAR on the remote server using</p>
  
  <pre><code>java -jar Server.jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
  </code></pre>
  
  <p>but on the console I see no output like "listening on port 5005...".</p>
  
  <p>When I press debug in IntelliJ it says</p>
  
  <blockquote>
    <p>unable to open debugger port (198.xxx.xxx.xx:5005):
    java.net.ConnectException "Connection refused"</p>
  </blockquote>
  
  <p>This is my IntelliJ configuration:<br>
  <a href="https://i.stack.imgur.com/NpWox.png" rel="noreferrer"><img src="https://i.stack.imgur.com/NpWox.png" alt="enter image description here"></a></p>
  
  <p>I also tried using <code>-Xdebug</code> but it still didn't work.</p>
  
  <p>If I set <code>suspend=y</code> it should wait until a debugger is connected, but instead, it starts without problems.</p>