Skip to content

Instantly share code, notes, and snippets.

@theon
Created January 24, 2013 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save theon/4625742 to your computer and use it in GitHub Desktop.
Save theon/4625742 to your computer and use it in GitHub Desktop.
#!/bin/sh
test -f ~/.sbtconfig && . ~/.sbtconfig
SBT_LAUNCH=/usr/local/Cellar/sbt/0.12.1/libexec/sbt-launch.jar
# Take leading integer as debug port and not sbt args
DEBUG_PORT=$1
SBT_ARGS=`echo "$@" | grep -oE "[^0-9].*"`
exec java -Xmx512M -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${DEBUG_PORT} ${SBT_OPTS} -jar $SBT_LAUNCH $SBT_ARGS
@rmmeans
Copy link

rmmeans commented Jun 10, 2014

👍 Very nice! I got tired of never being able to run more than one app at a time since I had originally only hacked my .sbtconfig file. This is a much better solution. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment