Debugging AJAX on a mobile device is tricky at best. There are no Firebug or F12 tools available. This means we do not have a nice way to set break points or step through our code when there is an error. Not to mention how do you even know when there is an error or what error actually happened?
Invoking the Mobile Safari, iPhone & iPad, is actually pretty easy. You need to open up the settings on your iOS device, then select Safari. Your screen will look like the following:
At the bottom of the screen you will see a Developer line. Touch it and you will now see the following:
Simply touch, not swipe, the On/Off toggle to the right of the Debug Console line. Now when you open any site in Mobile Safari you will now see the Debug Console bar at the top of every page. Anytime the console.log or console.[anything] is used on the page you will see it reflected in the debug bar. When an error is logged you will see that as well. To actually see the log, just touch the debug bar.
While this is not a perfect solution I have found it to be extremely valuable when troubleshooting my mobile applications. iOS is pretty easy, Android has an option available and I hope to write about it soon. At this point I do not know of anything available in Windows Phone.