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
Please sign in to leave a comment.
Maybe this is a way of doing so:
http://stackoverflow.com/questions/4150776/debugging-scala-code-with-simple-build-tool-sbt-and-intellij
Is there a better way?
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.
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.
Thanks. That's good news. :)
Is it planned very far in the future?
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!
Never mind, I figured it out. Details on https://superuser.com/questions/1427272/intellij-remote-debugger-connects-but-breakpoints-are-not-working-for-scala-jet.