0

How do you debug a request? Like the code below. This is javascript. And I am running through firebug. But I never get anything on

 if (status == google.maps.GeocoderStatus.OK) 

To check the status. So the call goes out. And nothing back. How can someone debug this? Is there some other way to get an error code?

thank you

function codeAddress() {
  geocoder = new google.maps.Geocoder();
  service = new google.maps.DistanceMatrixService();
    var address = document.getElementById("storeAddress").value;
    geocoder.geocode( { 'address': address}, function(results, status) {
      if (status == google.maps.GeocoderStatus.OK) {
        storeGeo = results[0].geometry.location;

      } else {
        alert("Geocode was not successful for the following reason: " + status);
      }
    });
  }
4

1 回答 1

0

您可以使用wireshark 检查请求是否发送到接口,或者您可以将GET-URL 字符串XESSION_XDEBUG_START 附加到url。

于 2012-08-02T23:55:15.767 回答