AJAX and PHP End-to-End Debugging

Cal Evans at the Zend DevZone just posted my screencast on AJAX and PHP End-to-End Debugging.

I mentioned in the screencast that I you could find some information on my blog that is used in the video, so this is that post.

Based on this post by Greg Beaver you can debug AJAX applications with the Zend Debugger by simply taking the QUERY_STRING as he mentions and placing it as GET arguments for your AJAX request.

start_debug=1&debug_host=YOUR IP&debug_port=YOUR DEBUG PORT&debug_stop=1

for example:

start_debug=1&debug_host=192.168.0.102&debug_port=10000;debug_stop=1

In context, this looks more like (using Prototype):

[php]
‘;
?>


AJAX End-To-End Debug Demo







?>
[/php]

The file ajax.php looks like this:

[php]
Hello ” .htmlspecialchars($_POST[‘name’]). “

“;
} else {
echo “

Ut Oh! I think you’re having an identity crisis!

“;
}
?>
[/php]

Hope you enjoy the screencast!

– Davey