How do I change the SBT debug port on a per project basis?
I can add the debug JVM options to the environment variable SBT_OPTS
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
But this will apply to all SBT instances and if I want to run SBT in debug for two separate projects simultaneously, I get this error because the port is already in use:
ERROR: transport error 202: bind failed: Address already in use
Modifying the sbt script that came with sbt via homebrew, I made this script that lets you start sbt and specify the debug port like so:
https://gist.github.com/4625742