使用IntelliJ 9社区版可以在REMOTE服务器上调试GWT客户端代码吗? [英] Is it possible to debug GWT client code on a REMOTE server using IntelliJ 9 Community Edition?

查看:121
本文介绍了使用IntelliJ 9社区版可以在REMOTE服务器上调试GWT客户端代码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将我们的Google Web Toolkit(GWT)开发从Eclipse转移到IntelliJ 9社区版。到目前为止,我已经能够通过GWT Maven插件及其嵌入式Jetty容器成功运行和调试客户端/服务器代码。不过,我在调试客户端代码的时候遇到了麻烦,因为它已经在远程机器上运行了(因此不需要内置的Jetty容器)。

>

有没有人成功实现这个目标?任何帮助将不胜感激!



更新:我终于能够完成这一点。请看下面我自己的回答...

解决方案

我终于可以通过使用GWT的 DevMode class,如文档



总之 -




  • 将项目添加到IntelliJ 9社区版

  • 添加应用程序运行/调试配置

  • 使用 com.google.gwt.dev.DevMode 作为主类(确保将gwt-user和gwt-dev jar包含到项目类路径中。请参阅此处

  • 添加以下程序参数:



    -noserver -war[爆炸战争的完整路径]-gen[生成文件的完整路径]-logLevel INFO -port [远程服务器端口] -startupUrl[远程页面的URL][com.company .YourEntryPoint]



通过这种方式,DevMode运行器不会实例化内置容器并允许远程服务器的JavaScript以原始Java形式进行调试。



请注意,对于不需要调试远程客户端代码的构建,您可以使用Maven或Ant集成,这非常简单。我对webAppCreator生成的build.xml没有任何经验,但对于Maven,您可以简单地使用此参数运行gwt:run或gwt:debug目标:-DrunTarget =



希望它有帮助!


I'm trying to move our Google Web Toolkit (GWT) development from Eclipse to IntelliJ 9 Community edition. So far I've been able to run and debug client/server code successfully via the GWT Maven plugin and its embedded Jetty container.

However, I'm having trouble debugging client code when it is already running on a remote machine (and hence there's no need for the embedded Jetty container).

Has anyone been successful at achieving this? Any help would be appreciated!

UPDATE: I was finally able to accomplish this. Please see my own answer below...

解决方案

I was finally able to accomplish this by using GWT's DevMode class, as described in the documentation.

In short -

  • Add your project to IntelliJ 9 Community edition
  • Add an Application run/debug configuration
  • Use com.google.gwt.dev.DevMode as your main class (make sure to include gwt-user and gwt-dev jars to the project classpath. See here)
  • Add the following program parameters:

    -noserver -war "[full path to your exploded war]" -gen "[full path to generated files]" -logLevel INFO -port [remote server port] -startupUrl "[URL of the remote page]" [com.company.YourEntryPoint]

This way, the DevMode runner will not instantiate the built in container and will allow your remote server's JavaScript to be debugged in its original Java form.

Note that for builds that don't require debugging remote client code you may use Maven or Ant integration, which is much simpler. I don't have any experience with the webAppCreator generated build.xml, but with Maven you could simply run the gwt:run or gwt:debug goals with this parameter: -DrunTarget=

Hope it helps!

这篇关于使用IntelliJ 9社区版可以在REMOTE服务器上调试GWT客户端代码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆