eclipse 在远程浏览器中调试 GWT 应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3944164/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Debug GWT application in a remote browser
提问by rafalry
I try to debug the GWT app in a remote browser (located on other computer than Eclipse instance) for example in VMware environment. Unfortunately while opening address below there is no connection.
我尝试在远程浏览器(位于 Eclipse 实例以外的其他计算机上)中调试 GWT 应用程序,例如在 VMware 环境中。不幸的是,在下面打开地址时没有连接。
http://192.168.1.2:8888/app_test.html?gwt.codesvr=192.168.1.2:9997
I've tried adding -Dgwt.args="-bindAddress 0.0.0.0"
to Arguments -> VM argumentsbut the parameter seems to be unrecognized. Server still binds to localhost.
我尝试添加-Dgwt.args="-bindAddress 0.0.0.0"
到Arguments -> VM arguments,但该参数似乎无法识别。服务器仍然绑定到本地主机。
I use Google Eclipse plugin. Thank you for any help.
我使用 Google Eclipse 插件。感谢您的任何帮助。
回答by z00bs
In eclipse open your debug configuration and add the param -bindAddress 192.168.1.2
(replace the ip with the local ip address of your machine) to the arguments > program arguments
. That's how we debug in virtual box.
在 Eclipse 中打开您的调试配置并将参数-bindAddress 192.168.1.2
(将 ip 替换为您机器的本地 ip 地址)添加到arguments > program arguments
. 这就是我们在虚拟框中调试的方式。
回答by alextk
The steps I have used using Eclipse/GWT 2.4:
我使用 Eclipse/GWT 2.4 使用的步骤:
- Add the param "-bindAddress 0.0.0.0" in "Run Configuration|Arguments|Program Arguments" (Eclipse) on the server PC/Mac/Linux
- Server firewall: Open the port 9997 (in)
- Client firewell: Open the port 9997 (out)
- Lastly (and that was the step missing that prevent running/debugging). In your client Chrome browser, go the options (chrome://settings/extensions) and add the server IP address in the list of allowed hosts
- Start the server, it will display the proper URL
- 在服务器 PC/Mac/Linux 上的“运行配置|参数|程序参数”(Eclipse)中添加参数“-bindAddress 0.0.0.0”
- 服务器防火墙:打开9997端口(入)
- 客户端防火墙:打开端口 9997 (out)
- 最后(这是阻止运行/调试的步骤)。在您的客户端 Chrome 浏览器中,转到选项 (chrome://settings/extensions) 并在允许的主机列表中添加服务器 IP 地址
- 启动服务器,它会显示正确的 URL
回答by Dr. Max V?lkel
For people struggling with GWT and Maven: The plugin accepts a parameter
对于在 GWT 和 Maven 上苦苦挣扎的人:插件接受一个参数
-Dgwt.bindAddress=0.0.0.0
other syntaxes did not work for me
其他语法对我不起作用