Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug scalatra application in IntelliJ Idea? [duplicate]

I can't find any documentation or examples of debugging Scalatra apps in IntelliJ Idea. Is it possible to run the Scalatra app in debug mode to attach the Idea?

like image 803
Valentin V Avatar asked May 23 '13 15:05

Valentin V


1 Answers

First. Go to the IDEA an choose edit configurations action:

enter image description here

On this tab, add new remote configuration:

enter image description here

Next, run Scalatra with those options:

enter image description here

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.

like image 109
om-nom-nom Avatar answered Sep 28 '22 14:09

om-nom-nom