
docker/xdebug.ini file by changing the line to xdebug.log=/dev/stdout.Ĭonfigures which logging messages should be added to the log file. In case you don't want to see these logs you can comment out this line of your. For example, xdebug.mode=trace and xdebug.start_with_request=yes starts a Function Trace for the whole request.Ĭonfigure Xdebug's log file, but in here, we are redirecting the log content to the default stdout of our container.
PHPSTORM FOR LARAVEL CODE
The functionality starts when the PHP request starts, and before any PHP code getting executed. If it is not present, the default falls back to an empty string.


The default gets based on the DBGP_IDEKEY environment setting. The IDE Key is only important for use with the DBGp Proxy Tool, although some IDEs are incorrectly picky as to what its value is. This can be used to step through your code while it is running, and analyze values of variables.Įnables Profiling, with which you can analyze performance bottlenecks with tools like CacheGrind.Ĭontrols which IDE Key Xdebug should pass on to the debugging client or proxy. This setting controls which Xdebug features gets enabled, according to the documentation the following values gets accepted:Įnables Development Helpers, including the overloaded var_dump().Įnables Code Coverage Analysis to generate code coverage reports, mainly with PHPUnit.Įnables Step Debugging.

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 PhpStorm.ī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.
PHPSTORM FOR LARAVEL HOW TO
In my last post, I've talked about how to configure Xdebug in VSCode with Docker.
