I'm developing a mobile application and am having trouble debugging my server-side code. I make cross-domain AJAX
requests from the app. Normally, I would use var_dump()
to display the contents of variables to the browser, but with these cross-domain requests, I can't figure out how to do something similar. What are some common methods that one might use to visualize what happens within the server-side script from a cross-domain perspective?
Here is the bulk of what my AJAX
requests look like:
$.ajax({
async: false,
url: 'http://mysecretsite.com/page.php',
data: mySecretData,
dataType: 'jsonp',
jsonp: 'callback',
jsonpCallback: 'mySecretCallback',
success: function(){
alert("success");
},
error: function(xhr, status, errorThrown){
alert("Oops: " + status);
},
complete: function(){
alert("complete");
}
});