Last active
July 25, 2017 18:11
-
-
Save carymrobbins/df6b39b0aa8a0c462d0e to your computer and use it in GitHub Desktop.
IntelliJ SBT Debug script for remote debugging, particularly through Vagrant.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -ex | |
| # Sets the port that IntelliJ attaches to | |
| true ${LISTEN_PORT:=5005} | |
| # Sets whether or not the process waits for the debugger to attach | |
| true ${SUSPEND:=y} | |
| JVM_DEBUG=-Xdebug | |
| JVM_RUN=-Xrunjdwp:transport=dt_socket,server=y,suspend=$SUSPEND,address=$LISTEN_PORT | |
| SBT_OPTS="$JVM_DEBUG $JVM_RUN" sbt "; set javaOptions ++= Seq(\"$JVM_DEBUG\", \"$JVM_RUN\") ; $@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment