docker/xdebug.ini on the root of our Laravel project. docker folder into /etc/php8/conf.d/50_xdebug.ini at the container.Įven though the content of the file got shown, I intentionally didn't explain its content so that we could explore the debugging topic all at once, going all the way from configuring Xdebug to using it with an IDE.ĭown below, we have the same Xdebug config file from the previous post, placed at. You will notice that at some point a xdebug.ini file gets copied from a local. The information was first introduced on the topic of the command directive in a previous post. I'm a heavy Neovim user, and I didn't adapt quite well to using Neovim with Xdebug it is just easier and faster to use my code snippets around the dd() function.īut occasionally, I catch 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 who aren't familiar with Vim or Neovim.īefore jumping into VSCode, first we have to clear up a few things about Xdebug to fully grasp the changes we’re going to make to the IDE. I'm included in the 62% of developers who debug 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? Recent research from JetBrains shows that 62% of 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 such 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 talked about how to configure a development environment and how it extends a Dockerfile made for production.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |