Skip to content

Instantly share code, notes, and snippets.

@sam
Created June 21, 2013 15:00
Show Gist options
  • Save sam/5831784 to your computer and use it in GitHub Desktop.
Save sam/5831784 to your computer and use it in GitHub Desktop.
sbt-debug script
#!/bin/sh
test -f ~/.sbtconfig && . ~/.sbtconfig
SBT_LAUNCH=/usr/local/Cellar/sbt/0.12.3/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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment