I’m of the opinion that being able to debug code is one of the must-have skills of any professional developer so it stands to reason that I think if you’re working with WordPress in a professional capacity, you should be able to debug WordPress projects.
It doesn’t matter if you’re working on the server-side or the client-side; if you’re writing code, then you need to be able to:
- set breakpoints,
- watch variables,
- step into functions,
- step out of functions,
- step over functions,
- change values,
- …and so on.
Though debuggers are common place in practically every programming environment, I recently wrote a short tutorial and filmed a short video for Envato that walks users through how to debug WordPress projects.
Debug WordPress Projects (in 60 Seconds)
If you have an IDE such as PhpStorm, then the chances of using the built-in debugger are high. Furthermore, if you’re used to using Firebug or Chrome’s Developer Tools, then you’re probably used to using the client-side debugger.
Regardless of which side of a project you’re debugging, the options, features, and procedures are usually the same.
From the tutorial page:
In this quick video, we’ll see how we can take advantage of a third-party application in order to debug WordPress applications using IDEs that don’t have built-in debuggers.
In any case, using functions like var_dump
and echo
aren’t great for more serious debugging.
If you’re looking for how to get started doing exactly that and perhaps even looking for a stand-alone debugger, then check out the article.
Done in 60 Seconds?
As mentioned in a previous post that covers another topic in 60 seconds, this series of posts is a new category on Envato.
It’s geared towards those who are looking to get up and running quickly with an idea (to whet their appetite, so to speak), and for those who are a bit more experienced with certain topics. Though the video shares the basics of how to debug WordPress projects, there’s always more to learn.
Oh! And if you’re looking for a good standalone debugger for OS X, I’m a fan of Codebug.