I'm testing an Ajax/jQuery-loaded PHP module and I was wondering if there's a simple way to debug this without using a full featured debugger.
My very simple debugging option is to echo some data and read browser output, however due to Ajax-loaded modules nature, output is hidden.
While I can return debugging data until the ajax-loaded module is running, I can't track or "see" program interruptions if error occurs.
Is there a way to allow "output" also in the ajax-loaded modules? Or ?
I suppose a solution could be using FirePHP :
Use WebKit's console (Chrome / Safari) or FireBug to check what's going on and make use of console.log() in both. Google a bit to see what console is and how console.log() is useful for debugging in such apps. In webkit you can also have breakpoints and other nice fiddly things that usually only IDE's offer.
Grab the 'HTTPFox' add on for Firefox, you'll wonder how you managed to do anything (especially with AJAX) without it.
https://addons.mozilla.org/en-US/firefox/addon/httpfox/
It is also possible to inspect requests and responses on a browser agnostic basis with Fiddler so debugging Ajax can be done on any browser, even old versions of Internet Explorer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With