I'm having problems trying to debug a test that doesn’t work on Play.
At first I couldn’t get him to get to the breakpoint, which, as it turned out, was caused by the deployment of a new JVM, which occurs during testing, so I found out what I need to add:
javaOptions in Test ++= Seq(
"-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9998"
)
to file build.sbt.
Now it hits the breakpoint when I run the debugger (I use IntelliJ), but the problem is that it will not let me start the debugger before it starts the tests.
If I use play debug, then playback will start and the socket will open (9999), and then I can start the debugger, and only then in the playback console will it launch my application (using run), but I can not do the same with the tests.
When I use play test, tests will start, so I have to start the debugger after running the tests.
Is there any way around this?
Thank!
source
share