How can I enable remote debugging for SBT in windows?

浪尽此生 提交于 2019-11-30 04:50:59

Seems like the Windows version of SBT doesn't define this functionality.

On Linux it is defined in the $SBT_HOME/sbt/bin/sbt-launch-lib.bash as

addDebugger () {   
  addJava "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=$1" 
}

You can achieve the same result by setting the SBT_OPTS environmental variable on Windows.

Run SBT like this, to make the debugger listen on port 5005

set SBT_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005" && sbt
set SBT_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
sbt run

was the only working solution on Windows 7.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!