Debugging Google Web Application projects with Google Cloud Endpoints in Eclipse

坚强是说给别人听的谎言 提交于 2019-12-04 06:05:16

问题


My iOS app uses a Java-based server and communicates with it using Google Cloud Endpoints. Normally the server listens on https://myservice.appspot.com/_ah/api/rpc.

How can I debug my server code? After I run it with Debug As | Web Application inside Eclipse and change its URL to https://localhost:8888/_ah/api/rpc the client cannot connect. I don't think it's a firewall issue because URLs with localhost:8888 work for other client-server pairs.

So does one need to take any special steps for debugging code in Google Web Application projects with Google Cloud Endpoints in Eclipse, and is there a better way to set their required URL on the client than hardcoding it (like I currently try)?


回答1:


The first cause why this did not work was that I tried to connect to localhost over SSL.

The second cause was that my real device of course needs to contact the dev server not as localhost, but using its remote IP address (currently 10.0.0.2 on my WLAN).

The third cause was that the firewall on my OS X 10.9.3 Mac prevented my real device from connecting to its port 8888. I had to disable Block all incoming connections and allow incoming connections for the applications Eclipse and java under System Preferences | Security & Privacy | Firewall Options. (OS X will prompt for permission the first time a connection is attempted.)



来源:https://stackoverflow.com/questions/24378419/debugging-google-web-application-projects-with-google-cloud-endpoints-in-eclipse

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