开发者

Debug GWT application in a remote browser

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.

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 arguments but the parameter seems to be unrecognized. Server still binds to localhost.

I use Google Ecli开发者_开发技巧pse plugin. Thank you for any help.


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.


The steps I have used using 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


For people struggling with GWT and Maven: The plugin accepts a parameter

 -Dgwt.bindAddress=0.0.0.0  

other syntaxes did not work for me

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜