[2.4-scala] Remote debugging

19 views
Skip to first unread message

Toby Hobson

unread,
Jul 31, 2015, 10:10:51 AM7/31/15
to play-framework
I posted this earlier but I realise I did not follow the correct format so please accept my apologies ...

I'm trying to debug a play 2.4 app. I followed these docs and I also tried running activator -jvm-debug 9999 run. The problem is that sbt/activator is forking a JVM for the play app therefore remote debugging is pointless. I had a similar situation with a grails app but grails accepts a flag to say "run forked jvm in debug mode". Is there something similar in play? or otherwise how else would I debug a play app? Thanks


Toby Hobson

unread,
Jul 31, 2015, 10:20:26 AM7/31/15
to play-framework, toby....@gmail.com
For the moment I commented out the fork in run setting in build.sbt which is a temporary workaround. Strangely Ive noticed that running activator ui adds this setting back again! :D

Toby Hobson

unread,
Jul 31, 2015, 10:30:15 AM7/31/15
to play-framework, toby....@gmail.com
After some digging I found that adding

javaOptions in run += "-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999"

to build.sbt does the trick. Maybe this should be added to the play docs as forked mode seems to be the default now?


On Friday, July 31, 2015 at 3:10:51 PM UTC+1, Toby Hobson wrote:
Reply all
Reply to author
Forward
0 new messages