Debugging for WordPress Developers: Changing Values at Runtime

So far, this series has provided a series of screencasts that have provided:

In today’s screencast, I’m going to turn my attention to actually changing values at runtime while debugging. This means that while you’re executing your WordPress theme, plugin, or other web application, you can review and even change the values while the program is running.

Changing Values at Runtime

This is useful not only for debugging but for testing various sections of code that allow us to trace how the code is performing, where it’s branching, and if it’s running exactly as we’d expect.

Changing Values at Runtime

This particular screencast is a bit longer than previous ones; however, this is because the nature of what we’re doing is much more involved than that other videos have provided.

My goal is to help equip you with the tools you need to see your code as WordPress, PHP, and ultimately the entire development environment sees your code. This will help make you a better programmer, help you to think of the code as the computer “thinks” and helps you evaluate how your code is written.

In this screencast, I use the following:

As you can tell, there’s a lot to understand and to take in when working with variables during runtime. This doesn’t mean that it has to be difficult, though.

Because once you understand how to alter a single variable, then you’re able to do so with any value that’s set during runtime.

So as much practice and experimentation as it may require, it pays dividends with work you’re doing now and with work you will do in the future.

Additional Resources

As we move into the final section of this series, I’ll be sharing additional resources that I believe will help you become a more skilled and even more marketable WordPress developer.

But to do so, please make sure you’ve kept up with everything that’s been covered in this series thus far. Everything we’re going to review in the upcoming posts is predicated on that, and everything that you can employ in your development environment is built into this series of posts.

For now, though, review the screencasts, practice debugging, and even look at the plugin that I’ve mentioned along with some others that you may find useful and see just how powerful understanding debugging can be.