Playframework 如何使用sbt/eclipse调试play框架

Playframework 如何使用sbt/eclipse调试play框架,playframework,sbt,Playframework,Sbt,看医生,这看起来很容易做到。我应该只需要用 sbt -jvm-debug 9999 run sbt run 但是,我确实收到了以下错误消息: [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] Load

看医生,这看起来很容易做到。我应该只需要用

sbt -jvm-debug 9999 run
sbt run
但是,我确实收到了以下错误消息:

[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
  • 播放:版本2.6.x
  • SBT:1.0版
  • 操作系统:Windows 10

作为一种解决方法,我添加了以下行

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999
在文件中

sbtconfig.txt
只需使用

sbt -jvm-debug 9999 run
sbt run
您将看到跟踪:

Listening for transport dt_socket at address: 9999

在每一个版本的剧本中都有令人难以置信的地方,我从未做过直接有效的事情^^