Debugging Google Web Application projects with Goo

2019-03-04 03:28发布

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条回答
地球回转人心会变
2楼-- · 2019-03-04 03:34

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.)

查看更多
登录 后发表回答