Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug GWT application in a remote browser

Tags:

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.

like image 367
rafalry Avatar asked Oct 15 '10 16:10

rafalry


People also ask

What is GWT development mode?

Using GWT Development Mode will launch the CodeServer and a embedded Jetty web server by default. There will start two servers, the first being the Jetty web server and the CodeServer which will listen for compile requests from the browser.


2 Answers

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.

like image 89
z00bs Avatar answered Nov 09 '22 15:11

z00bs


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
like image 44
alextk Avatar answered Nov 09 '22 15:11

alextk