peterphonic
peterphonic

Reputation: 1039

How to debug play framework with sbt/eclipse

Reading the doc, it looks pretty easy to do that. I should only need to start the application with

sbt -jvm-debug 9999 run

But, I do have this error message :

[info] Loading settings for project play-java-ebean-example-build from plugins.sbt ...
[info] Loading project definition from D:\play\play-java-ebean-example\project
[info] Loading settings for project root from build.sbt ...
[info] Set current project to play-java-ebean-example (in build file:/D:/play/play-java-ebean-example/)
[error] Expected symbol
[error] Not a valid command: -
[error] Expected end of input.
[error] Expected '--'
[error] Expected 'debug'
[error] Expected 'info'
[error] Expected 'warn'
[error] Expected 'error'
[error] Expected 'addPluginSbtFile'
[error] -jvm-debug 9999 run
[error]  ^
[INFO] [12/30/2018 17:19:45.858] [Thread-3] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook

Upvotes: 0

Views: 329

Answers (1)

peterphonic
peterphonic

Reputation: 1039

As a workaround, I added the following line

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999

in the file

sbtconfig.txt

And simply start the application with

sbt run

You`ll see the trace :

Listening for transport dt_socket at address: 9999

Upvotes: 1

Related Questions