First. Go to the IDEA an choose edit configurations action:
On this tab, add new remote configuration:
Next, run Scalatra with those options:
For example:
java
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 -jar **-assembly-**.jar
Now hit the green debug button of your IDEA and enjoy debugging. There might be another ways to run scalatra (e.g. from sbt jetty-run) but generally all you need is to feed those options to the jvm instance.