
A Nasty Bug *
Arguably, one of the most valuable skills in web development is the ability to debug quickly and efficiently. Bugs are an inseparable part of software development, no matter how great the developer is. There are best practices and tools that can bring the number of bugs to a minimum; and if you are writing a project from scratch, you have great leverage to control the environment, and implement those best practices. PHP coders these days have a great selection of debugging tools available, such as Xdebug, and even full-featured IDEs, like Zend Studio. I think tools like these are fantastic, and everyone should use them!
However, we don’t always have access to these tools, or ability to control the environment. Sometimes, depending on the nature of the project, we take over someone else’s code, don’t have access to servers, or have to use someone else’s computer with a plain text editor.
So what is debugging guerilla style? I’m talking about the covert and creative ways of finding the error fast, when you don’t have many tools to work with. Sometimes the stuff just hits the fan, and you need to dive in and get it fixed. These tactics may not be the Holy Grail of efficient development, but they may be the only ones available in some situations. They have certainly saved my behind on many occasions. Some of them are PHP-centric, while others can help with pretty much any language.
Once I started writing this, I realized it might be too much information for a single post, so I will break this into a series. This collection is as much for my personal reference, as for public use, therefore I welcome any comments, questions or suggestions. The last thing I want to do is put out false information out there.
Part I: “OMG, I’m Getting A Blank Screen!” or how to set error reporting in PHP.
* Photo by cibergaita



One Trackback/Pingback
[...] PHP Diva actually getting paid for being a smartass About « Debugging PHP, Guerilla Style [...]