

If you opt to configure a new CLI, verify that the IDE correctly detects the interpreter executable and debugger availability status after configuration. Otherwise, the three-dot button (red-marked in the image) will help you configure your CLI that will be used during the debugging process. If you already configured the CLI before, you can see it here. PHPStorm will import the settings and magically getting CLI interpreter configs into place. In the PHP section in PHPStorm setting, create a new CLI interpreter config from your docker/docker-compose setting. Next, docker-compose stop and docker-compose start (or if you don’t use docker-compose then it should be docker container stop and docker container start respectively) to restart the container and make the changes take effect.įinally, verify that the PHP > Debug section in your PHPStorm setting to make sure that the Xdebug port there points to the same port you defined in the xdebug.ini file. # For Xdebug version 3.x zend_extension =xdebug
PHPSTORM DEBUG JAVASCRIPT INSTALL
If you don’t already have Xdebug installed, you need to install it before continuing.Īfter installing Xdebug, create a file named xdebug.ini under //conf.d/ and save these lines into it (note that you can use php -ini to know where your php configs are located at): Install Xdebug plugin for PHP and config Xdebug to play well on Dockerĭouble-check if the PHP version installed in your Docker container already has Xdebug (by using command php -v and see if the output says anything about Xdebug).
PHPSTORM DEBUG JAVASCRIPT HOW TO
This article will guide you through how to achieve that with the context of a Laravel app in a Docker container and about debugging an Artisan command. Technologies jetbrains phpstorm php laravel dockerĪlso, learn how to debug Laravel web application here and debug Laravel unit test here.įind yourself having too many times adding and removing console output command just to inspect variables or process flow? Switch to step-by-step code execution, breakpoint-based debugging using IDE (PHPStorm) and XDebug to save time and your sanity.
