[英]How do you debug a request
您如何調試請求? 像下面的代碼。 這是javascript。 而且我正在穿越螢火蟲。 但是我什么也沒穿
if (status == google.maps.GeocoderStatus.OK)
檢查狀態。 這樣電話就響了。 一無所有。 有人如何調試呢? 還有其他獲取錯誤代碼的方法嗎?
謝謝
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);
}
});
}
您可以使用wireshark來檢查是否將請求發送到接口,也可以將GET-URL字符串XESSION_XDEBUG_START附加到URL。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.