[2.4] Remote Debug with Eclipse

163 views
Skip to first unread message

Jay Q.

unread,
Jul 17, 2015, 9:28:14 PM7/17/15
to play-fr...@googlegroups.com

So I've been pulling my hair (what's left of it) trying to get remote debugging to work. 


In an older Play project (v2.0), I'm able to make the connection from eclipse work with no problems, but since activator was introduced, it hasn't worked for me.


Here's what I'm doing:


activator -jvm-debug 9999 run


and get:


Listening for transport dt_socket at address: 9999


In eclipse, I created a remote debug configuration and have set the port to 9999 (I also tried different ports).


When I run the debug, I get this pop up from eclipse:


Failed to connect to remote VM. Connection refused.

Connection refused


I also tried to telnet to see if the port actually opens:


telnet localhost 9999


and get:


Trying ::1...

telnet: connect to address ::1: Connection refused

Trying 127.0.0.1...

telnet: connect to address 127.0.0.1: Connection refused

Trying fe80::1...

telnet: connect to address fe80::1: Connection refused

telnet: Unable to connect to remote host


What am I missing here?

Dmitry O

unread,
Jul 20, 2015, 6:39:58 AM7/20/15
to play-fr...@googlegroups.com
Try this in build.sbt:

fork in run := false

fork in Test := false

Jay Q.

unread,
Jul 23, 2015, 6:31:14 PM7/23/15
to play-framework, itpro2...@gmail.com
That worked thanks!

Could you explain exactly what for? Is it ok to leave this setting to false in production?

Dmitry O

unread,
Jul 24, 2015, 4:13:07 AM7/24/15
to play-framework, jqui...@gmail.com
Actually, for test debugging, you can have just the "fork in Test" set to "false".
I'm not sure how "fork in run" affects the production mode.

As far as I remember, the "fork" here means that tests are run in a separate JVM. That is why the debugger couldn't work properly: it attached to one JVM and tests ran in another. When "fork" was set to false the tests ran in the same JVM which the debugger connected to.


пятница, 24 июля 2015 г., 1:31:14 UTC+3 пользователь Jay Q. написал:
Reply all
Reply to author
Forward
0 new messages