Every programmer knows that the hardest kind of bug to find is the semantic bug.
Every piece of code will be guaranteed to work for the first line written. Maybe, even the first five (5) lines will also work, but what if you have a web of functions and a nasty thousand liner code to write? This is where debugging is going to be challenging.
Before the web, standalone softwares or the "install-me" programs are what are rampant. It has called programmers into perfection in coding, skill, and testing. Some have perfected standalone/software programming in different languages. You've known C/C++, Pascal/Delphi, Python, Java, VB, etc. Programmers took their own path and strengthened their skills. There came about many integrated development environments (IDEs) that can help you speed up process of development.. including debugging.
Soon, web scripting took the limelight. More and more people have put efforts into putting things on the web. Before social networks came about, only companies and well to-dos can have their own websites and thingies on the net. But since the birth of the easiest and most common scripting language–PHP, things took on a different turn. Now, it seems the group of software developers have split into two. Some are now doing softwares and some are now into the web.
Softwares are compiled. Web pages are browsed. There have also emerged a lot of tools and frameworks to assist/aid in proper development. Some have already eliminated bugs in the process of its existence, yet some bugs are just too difficult to find since they blend well into the perfectly syntax-bug free code. The old fashioned, yet reliable breakpoints are no longer easily implemented in web scripts.
Looking up things over the net, out of curiosity, I've found the following things:
- A simple debug script that includes your PHP file and executes it inside the script. This is great for small quick PHP pages, but not for huge files that are a lot complicated.
- PHPEclipse for setting breakpoints. This is just great since it simulates the necessity of tracing over certain bottlenecks just like how its done in software development, but at worst, you'll have to do extra coding for you to be able to use breakpoints.
- A short but sweet file that works like the "debug script", but this time, it allows you to type in your php code inside a textarea and execute it. So, the debugging appears to be a little more interactive. Its called the PHP commander.
- Firefox's Great Add ons prove to be something worth exploring. Someof these are: Web Developer, Firebug, Modify Headers,