附加调试器(使用eclipse)来播放框架失败 [英] Attach debugger (using eclipse) to play framework failed
问题描述
我正在使用Scala在eclipse IDE的Play框架之上编写一个网页。我试图调试我的应用程序,但调试附件失败。我试图使用Java而不是Scala进行切换,但是我遇到了同样的错误。这就是我所做的。
I am using Scala to write a web on top of Play framework with eclipse IDE. I am trying to debug my app but hit debug attach failure. I tried to switch using Java instead of Scala,but I got same error. This is what I do.
- 创建项目并运行
播放清洁编译
$ b $在Eclipse中运行 - ,设置'debug configration' - >远程java应用程序 - > host:localhost ,端口:9999和common:debug
- 在浏览器类型的URL中输入:localhost:9999。然后在play框架命令行中得到以下失败:
调试器无法附加:握手失败 - 已收到> GET / HTTP / 1.1< - 预期> JDWP-Handshake
播放调试运行
- Create a project and run
play clean compile
- run
play debug run
- in Eclipse, set 'debug configration' ->remote java application -> host: localhost, port:9999 and common: debug
- in browser type in URL and enter: localhost:9999. Then get the following failure in play framework command line:
Debugger failed to attach: handshake failed - received
>GET / HTTP/1.1< - expected >JDWP-Handshake<
任何想法有什么问题?
Any idea what is wrong?
推荐答案
localhost:9999
是Eclipse将用于沟通与您的应用程序。在您的浏览器上,您仍然可以在 localhost:9000
(默认)上访问您的应用程序,但是如果您刚刚完成 code>。
localhost:9999
is what Eclipse is going to use to communicate with your application. On your browser, you still access your application on localhost:9000
(default) or however you would access your application had you just done play run
.
基本上,您已经在Eclipse中正确配置了调试。
Basically, you've configured your debugging correctly in Eclipse.
- 现在,从调试配置中选择您的配置,点击调试(或从调试方式工具栏按钮中选择您的配置)。 Eclipse将附加到
localhost:9999
。 - 浏览到
localhost:9000
像你通常会访问您的应用程序。 - 就是这样。 Eclipse将暂停您设置的任何断点等。
- Now, with your configuration selected from the Debug Configuration, click Debug (or selected your configuration from the Debug As toolbar button). Eclipse will attach to
localhost:9999
. - Browse to
localhost:9000
like you normally would to access your application. - That's it. Eclipse will pause on any breakpoints you have set, etc.
这篇关于附加调试器(使用eclipse)来播放框架失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!