Just like programming itself, debugging is an art form. Also, the longer you do it, the better you get at it. After several years of developing software, experience and intuition will tell you which portion of the code to zoom in on when there is trouble. At the same time, experience isn't the only way to get better at debugging. Having the right tools at one's disposal and the knowledge to use them can cut down on debugging time significantly and can thus get you back to writing code more quickly. Hopefully, between learning to manage error logging configurations, developing a custom debug class that handles all exceptions and errors, and learning how to debug remotely, there are a few things we talked about in this chapter that you added to your arsenal.
I think that most developers who are not using a debugger are doing so because they think they don't need it. I'll be the first to admit that you can get a lot done with the combination of echo(), var_dump()
, and exit()
. However...