How to debug/launch a SBT Scala webapp

Hi,

I would like to debug this simple webapp template:
https://github.com/spray/spray-template/tree/on_jetty_1.1

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.

David

6 comments

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.
0

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.

0

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

0

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 https://stackoverflow.com/questions/44232723/intellij-remote-debugger-connects-but-breakpoints-are-not-working/55750937#55750937

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

Hope to hear back soon!

0

Please sign in to leave a comment.