XDebug Local addon released

Version 1.0 is out.

Time to wrap

This post is the last post in a series where I’m chronicling my attempt at a Local addon; you can find the other posts here:

  1. What I’m trying to build
  2. Understanding Local stack for the task at hand
  3. Enter React
  4. Enter testing
  5. Mocking with Sinon.js
  6. Introducing Enzyime
  7. Getting down and dirty with Enzyime

The high-level idea is to be able to control the XDebug configuration of the PHP version used to serve the site. This would allow me to activate and deactivate XDebug and set some relevant fields in the process.
The first release of the addon can be found here.

What does it do then?

Why waste words when we have GIFs?

It essentially exposes relevant XDebug settings in a way that will allow their control via the Local UI.

Was it worth it?

Yes: I needed the addon.
Also, this is my first adventure in React and I enjoyed every second of it.
The combination of testing (with Mocha, Chai, Sinon and Enzyme) with new and different tools (e.g.Electron) with the pattern of JavaScript programming React enforces has taught me a lot.
I had taken polite bites at React in the past after watching the first lessons of Wes Bos React course (which is great, by the way); I work on the base of enthusiasm and not having something to do with the knowledge made me drop the ball; this project proved to be fun and useful.

To write a Local addon

The starting point to write a Local addon was, for me, this article by Jeff Gould and his GitHub repository.
Where I rant, banter and blather about code Jeff provides clear and concise explanations so that is a better starting point.
Facebook React documentaion proved incredibly easy to follow, full of examples and covering less common cases.

Next

Now that I tasted blood I will iterate on the addon to add more features I, or others, could use:

  • add profiling settings to the managed fields, a good idea by @soderlind.
  • set and read relevant PHP settings, another good idea by @soderlind.
  • produce a WP-CLI configuration file to be able to run, from the host machine, the wp command without having to reverse-engineer the whole Local stack.
  • produce a Codeception and wp-browser suite configuration file to be able to run WordPress tests from the host machine; it’s not outright intuitive right now.

For the time being this seems enough, you can find the addon here.

I appreciate your input