

You will notice that at some point a xdebug.ini file gets copied from a local.

The information got first introduced on the topic about the command directive in a previous post. Not for lack of knowledge but because I'm a heavy Neovim user and I didn't adapt quite well using Neovim with Xdebug, to me, is just easier and faster to use my code snippets around the dd() function.īut from time to time, I caught myself in situations where it would be faster to jump into Visual Studio Code and just use Xdebug, especially when I'm working with other people that aren't familiarized with Vim/Neovim.īefore jumping into PhpStorm, first we have to clear a few things about Xdebug to fully grasp the changes we’re going to make on the IDE. I'm included in the 68% of developers debugging their code with auxiliary functions instead of using a full-featured debug solution such as Xdebug. Even if you do it by choice and not because you lack knowledge. From my perspective, there is nothing wrong with that.

So, why is this so important? A recent research from JetBrains shows that 68% of the PHP developers debug their code using var_dump(), die(), dd() and dump(). Now, I would like to share how we can build upon our previous Dockerfile in a way that Xdebug can run directly from Docker and also connect it with Visual Studio Code.īy choosing this approach, we substantially reduce the amount of setup that each team member has to do on their machine to get the project up and running, which means that we can start writing code faster. In my last post, I've talked about how to configure a development environment and how it extends a Dockerfile made for production.
