如何使用SBT / Eclipse调试Play框架

时间:2018-12-30 22:24:30

标签: playframework sbt

阅读文档,做到这一点非常容易。我只需要使用

启动应用程序
sbt -jvm-debug 9999 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

1 个答案:

答案 0 :(得分:0)

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

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

在文件

sbtconfig.txt

只需使用

启动应用程序
sbt run

您将看到跟踪:

Listening for transport dt_socket at address: 9999