Join Jon Peck for an in-depth discussion in this video Exploring remote debugging principles, part of Debugging PHP: Advanced Techniques.
One of Xdebug's features is the ability to remotely debug script execution.…In particular, it provides introspection into data structures and allows code execution …to be stepped through for debugging.…Remote debugging is turned off by default, so I will demonstrate how to turn it on.…Remember, this is for development purposes.…Do not use remote debugging in production environments.…Before I jump into configuration and demonstration, I will describe the workflow…where Xdebug interacts with the remote debugger.…This will provide context and highlight areas that should be investigated …if there are connection problems.…
First, the Web server listens for request, same as usual.…However, when a request is made, Xdebug will attempt to connect to the debugger…on the remote IP from the headers via port 9000.…If found the IDE will give instructions on where to pause and when to continue.…Whenever Xdebug is paused, it will provide information back to the debugger,…so this is a two-way communication.…Once the debugger says Xdebug can continue, the http response is updated.…
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