简体   繁体   English

附加调试器(使用eclipse)来播放框架失败

[英]Attach debugger (using eclipse) to play framework failed

I am using Scala to write a web on top of Play framework with eclipse IDE. 我正在使用Scala在eclipse IDE的Play框架上编写一个Web。 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. 我尝试使用Java而不是Scala进行切换,但是我得到了同样的错误。 This is what I do. 这就是我的工作。

  1. Create a project and run play clean compile 创建一个项目并运行play clean compile
  2. run play debug run 运行play debug run
  3. in Eclipse, set 'debug configration' ->remote java application -> host: localhost, port:9999 and common: debug 在Eclipse中,设置'debug configration' - >远程java应用程序 - > host:localhost,port:9999和common:debug
  4. in browser type in URL and enter: localhost:9999. 在浏览器中键入URL并输入: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< 然后在play framework命令行中出现以下故障:Debugger无法附加:握手失败 - 收到>GET / HTTP/1.1< - expected >JDWP-Handshake<

Any idea what is wrong? 知道什么是错的吗?

localhost:9999 is what Eclipse is going to use to communicate with your application. localhost:9999是Eclipse将用于与您的应用程序通信的内容。 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 . 在您的浏览器上,您仍然可以在localhost:9000 (默认)上访问您的应用程序,或者如果您刚刚完成了play run您将访问您的应用程序。

Basically, you've configured your debugging correctly in Eclipse. 基本上,您已在Eclipse中正确配置了调试。

  1. Now, with your configuration selected from the Debug Configuration , click Debug (or selected your configuration from the Debug As toolbar button). 现在,从Debug Configuration中选择您的配置 ,单击Debug (或从Debug As工具栏按钮中选择您的配置)。 Eclipse will attach to localhost:9999 . Eclipse将附加到localhost:9999
  2. Browse to localhost:9000 like you normally would to access your application. 像往常一样浏览到localhost:9000将访问您的应用程序。
  3. That's it. 而已。 Eclipse will pause on any breakpoints you have set, etc. Eclipse将在您设置的任何断点上暂停等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM