Debugging a GWT application in a remote environment

空扰寡人 提交于 2020-01-13 15:05:39

问题


I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:

http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997

I get

Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions

My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?

If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)

Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.


回答1:


If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.

Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.




回答2:


Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)

Just enable and disable it in :

chrome://chrome/extensions/

Good luck! It's the only thing wrong with GWT imho...



来源:https://stackoverflow.com/questions/8910472/debugging-a-gwt-application-in-a-remote-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!