21

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 Eclipse plugin. Thank you for any help.

rafalry
  • 2,620
  • 6
  • 24
  • 39

3 Answers3

22

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.

z00bs
  • 7,518
  • 4
  • 34
  • 53
  • z00bs, where do you suggest to add the'-bindAddress 192.168.1.2' param? When I try to put this into (Eclipse) `Run Configurations... -> Arguments -> Program arguments` I've got 'Unknown argument: -bindAddress'. – rafalry Oct 17 '10 at 11:07
  • 1
    The solution for the problem mentioned above is to user GWT SDK version 2.0.4 (for 2.0.0 bindAddress won't work). z00bs - thank you. – rafalry Oct 17 '10 at 11:41
  • You're welcome! I didn't know `bindAddress` requires a specific gwt version. Thanks for pointing that out. – z00bs Oct 17 '10 at 12:04
  • You no longer need to supply your local IP address. You can just use `-bindAddress 0.0.0.0` – Craigo Apr 24 '15 at 23:35
8

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
alextk
  • 5,713
  • 21
  • 34
6

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

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
Dr. Max Völkel
  • 1,780
  • 2
  • 17
  • 24