How to debug/launch a SBT Scala webapp


I would like to debug this simple webapp template:

I have already imported it in IDEA, thanks to its recent SBT support.
But how can I debug it?

In the launch configurations, I see many types (Maven, Scala, ....) but no SBT one.
In the doc, they say I have to use:
sbt container:start

Thanks in advance for any hint.


Comment actions Permalink

This is the way I've done to connect to a debugger:

From the command line run this:
sbt -jvm-debug 5005
> test
> container:start

I've created a remote config in IDEA to connect to 5005 port.

This doesn't work:
   sbt -jvm-debug 5005 container:start
because when sbt exits, it seems to kill my server.

I'd like that with the click of a button, compile the code if necessary, start the server and connect the debugger.
Comment actions Permalink

Hi! There's no automatic way to do that (yet). We'll surely add a debug option when we implement project build via SBT and support of running SBT tasks.

Comment actions Permalink

Thanks.  That's good news. :)
Is it planned very far in the future?

Comment actions Permalink

I tried for at least a few hours to set up a Scalatra remote debug with no success, not hitting breakpoints in my webapp.

Details at

And I'm on Mac, IntelliJ details in pic below

Hope to hear back soon!


Please sign in to leave a comment.