When running sbt, you can pass options using SBT_OPTS
. The following line allows to run sbt in debug
mode, you can bind your debugger to port 5004. It suspend the
server as long as the debugger is not bound. Not the option I would
normally use, but this allows to check that sbt did get the proper options.
SBT_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5004" sbt
The really nice thing about it, is, because sbt doesn't spawn a new process when starting the console, you can also debug the scala console started from sbt.
No comments:
Post a Comment