Join Jon Peck for an in-depth discussion in this video What is Xdebug and how can it be used?, part of Advanced PHP: Debugging Techniques.
While the core PHP distribution contains many tools for debugging and error handling, …it does have some inherence limitations such as the inability …to perform stack traces on fatal errors.…To provide this missing functionality and to give additional introspection …into script operation, the PHP extension Xdebug was created in 2002.…Currently at version 2.2.1, Xdebug is a debugging and profiling tool …for use on development servers.…By providing stack and function execution traces and error messages, …Xdebug allows fatal errors to be debugged with the same clarity available during …normal program execution without the limitation of the shutdown processes.…
Xdebug is also a profiling tool, which tracks how long it takes to execute …each part of a script, which is useful for finding performance bottlenecks.…Additionally, Xdebug provides mechanism for remote debugging allowing script execution …to be paused at any arbitrary point and the contents of variables …to be read and manipulated.…Xdebug is a powerful debugging tool and as such should not be used …
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