title: Not able to debug webservice code in IntelliJ
body: <p>I have a window service that I have installed.I have the source code of the application opened in Intelli J.</p>
  
  <p>I made configuration IntelliJ as following
  <img src="https://i.stack.imgur.com/xtp1K.png" alt="enter image description here"></p>
  
  <p>I checked the PID of the service and port it is using.</p>
  
  <p>While running Remote config in Intelli J it is giving following error</p>
  
  <pre><code>4:09:18 PM Error running Remote: Unable to open debugger port : java.net.ConnectException "Connection refused: connect"
  </code></pre>
  
  <p>Can someone please shed some light on how to debug window service in IntelliJ. It is a job schedule application.</p>
  
  <p>The installService.cmd is as follows</p>
  
  <pre><code>set HOME_DIR=%~dp0
  set SERVICE="Service_Name"
  SET JAVA_OPTIONS=-Xms256m -Xmx256m
  @echo Service name is Service_Name
  "pathname\Service_Name.exe" -install %SERVICE% %JVM% %JAVA_OPTIONS% -Djava.class.path="pathname\Service_Name.jar" -Dorg.quartz.properties="pathname/Service_NameScheduler.properties" -start com.org.st.Service_Name -stop com.org.st.Service_Name -out "D:/core_log\Service_Name_service_out.log" -err "D:/core_log\Service_Name_service_error.log" -current "pathname\apps"
  set JVM="C:/Program Files/Java/jdk1.6.0_29/jre/bin/server/jvm.dll"
  </code></pre>