Using Xdebug and Visual Studio Code is something that’s pretty easy to setup, but given that I’m still using Visual Studio Code should tell you something about how much I’m a fan of the IDE.
But here’s the thing:
If you’re a WordPress developer, debugging is something that you really need to learn. That is, don’t use
var_dump if you can help it. Use a legitimate debugger. It will help you think as the interpreter thinks and it will help you learn a bit more about Core.
Now that I’m off my soapbox, getting the necessary tools installed is easy. The article assumes you’re using MAMP Pro (since that’s what I use), but if you have access to php.ini then you’re going to be able to follow along.
Continue reading “Xdebug, Visual Studio Code, and MAMP”
If you’ve read any of my previous posts, you know that I think code sniffing (as funny as that sounds) is something that I believe to be a staple of any WordPress development environment. And this is how you can setup PHP CodeSniffer in Visual Studio Code.
But first, a word about VS Code.
Visual Studio Code is a source code editordeveloped by Microsoft for Windows, Linux and macOS. It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.
For the last few weeks, I’ve been giving VS Code a try with my day-to-day WordPress development. I’ve not entirely abandoned Atom nor do I have anything bad to say about it, but I think the distinction between and IDE and an editor should be made.
Atom is an editor; Visual Studio Code is a [lightweight] IDE.
This is something I’m planning to go more into detail about in a future post when I share my thoughts on using VS Code for the development of a project from beginning to end, but let that suffice for now.
I’m not going to belabor the points. I’ve written about them in other posts, but here’s how to set it up within VS Code.
Continue reading “Setting Up PHP CodeSniffer in Visual Studio Code”
VS Code is a new editor from Microsoft (I guess some may insert an obligatory flaming remark here, but I think they’ve done some pretty good stuff as of late) that I’ve only been following off and on since it was first announced.
Before working for myself, I was focused on .NET development and to this day, I’ve yet to find an IDE that I like as much as that.
But then, late last week, I saw this tweet:
Followed by this:
And then this resulted in a good, albeit short conversation.
I’ve never been a fan of switching IDEs in the middle of client projects (for some reasons), so I didn’t plan on giving this particular IDE a try for the foreseeable future.
But given that I’ve got a set of unfinished projects lying around and given that I had some time to myself this weekend, I opted to see how well VS Code worked with a couple of WordPress-based projects.
Continue reading “VS Code for WordPress Development”