尝试远程调试时无法为进程调度程序找到可用的套接字端口

failed to find free socket port for process dispatcher when trying remote debug

亮点:

问题:

我尝试在 this guide and getting an error in IDE: "failed to find free socket port for process dispatcher". It looks this issue is not IntelliJ-specific 之后设置远程 ruby 调试,我也能够用最新的 Ruby 我的重现它。

来自IDEA的日志

2017-07-07 21:53:03,515 [8879188] INFO - tion.impl.ExecutionManagerImpl - Failed to find free socket port for process dispatcher 
com.intellij.execution.ExecutionException: Failed to find free socket port for process dispatcher 
at org.jetbrains.plugins.ruby.ruby.debugger.RubyProcessDispatcher.<init>(RubyProcessDispatcher.java:46) 
at org.jetbrains.plugins.ruby.ruby.debugger.RubyRemoteDebugRunner.doExecute(RubyRemoteDebugRunner.java:62)
... 
Caused by: java.net.BindException: Address already in use: JVM_Bind 
at java.net.TwoStacksPlainSocketImpl.socketBind(Native Method) 
at java.net.TwoStacksPlainSocketImpl.socketBind(TwoStacksPlainSocketImpl.java:137) 
...

我可以理解它说 地址已在使用:JVM_Bind,但是远程调试应该如何工作呢? (我的意思是有没有办法访问来宾 vm 端口之前不转发它?显然没有)非常感谢任何解决这个问题的帮助。

对我来说,问题是由于另一个在后台打开的调试会话引起的。为了防止这种情况再次发生(并关闭所有其他当前打开的会话,一旦您再次 运行 配置)select "Single instance only" 在调试配置中: