Join Jon Peck for an in-depth discussion in this video Using PHP_Debug to debug without a console, part of Advanced PHP: Debugging Techniques.
PHP Debug is an open source, debugging library written in PHP that resides…completely server-side, so no particular browser or extensions are needed.…Some of its features include:…displaying the server configuration and global variables by default; …stack traces to provide context about program execution; variable dumping; …multiple rendering options, so either the results can be floated as a DIV or appended …as an HTML table at the end of execution; and PHP error-handling replacement.…So instead of Xdebug other debugging tools, PHP_Debug can provide contexts upon errors.…
PHP_Debug can be installed via PEAR.…Additionally, PHP_Debug uses another library.…Text-Highlighter also available via PEAR.…However, PHP_Debug has some hard coded configuration within the library itself, …and as of this writing, Text_Highlighter is no longer maintained …and contains a strict error that I fixed.…Therefore, I just included the libraries in the PHP_Debug directory …to simplify installation.…Opening the IDE, I'm going to restore demo.php to the state it was …
This course covers installation of Xdebug on Apache as well as working with the NetBeans IDE (integrated development environment). Jon then introduces native web browser developer tools for Firefox and Chrome, and demonstrates browser independent web debugging tools. Best practices for debugging and profiling web application failures and performance issues are also covered.
- Configuring PHP error reporting
- Logging errors to file
- Gracefully handling fatal errors
- Installing Xdebug
- Understanding the principles of remote debugging
- Remote debugging with NetBeans
- Extending your browser with Firebug, FirePHP, or ChromePHP