Phpstorm docker node debug8/28/2023 In the Settings window, select the Languages & Frameworks > PHP item and click on the button with the three dots next to CLI Interpreter to define the PHP interpreter to use. PHP_IDE_CONFIG=serverName=symfony-docker in docker-compose.yml in the highlighted line ( symfony-docker in this example): The name we give to the server in PhpStorm must match the one set as serverName in the environment variable PHP_IDE_CONFIG, i.e. the path where we mounted the sources in docker-compose.yml. On that line, on the right column, enter the corresponding path of the php container, i.e. Then, check Use path mappings, and in the panel below, in the left column, find the directory that contains the PHP project sources. In the Settings window, select the Languages & Frameworks > PHP > Servers and click on the + button to configure the PHP server to use: specify localhost as host and 8080 as the port (the same port we’re forwarding in docker-compose.yml). In PhpStorm, Let’s open the Settings window ( Ctrl - Alt - S ), select Build, Execution, Deployment > Docker, then press the + button to configure integration with Docker. On the Docker side, we’re done: we now must make our container and PhpStorm talk to each other. The Dockerfile is shown below:ĬOPY entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod 755 /usr/local/bin/entrypoint.sh ENTRYPOINT Setting up debugging in PhpStorm To be able to compile the extensions at build time, and to always have some useful commands at hand (in the container), I install some packages with apt-get. These extensions are installed with the docker-php-ext-install command for debugging I need the xdebug extension, which is a PECL extension and must be installed using the pecl install command.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |