I’m tweeting under giving talks and offering leadership coaching, consulting and workshops. Debuggen, Testen und Profiling Features PhpStorm. I strive for building happy, motivated, and productive teams and I’m enthusiastic about Kotlin, clean code, distributed systems, testing and the sociology of software development. I am Philipp Hauer and I work remotely as a Head of Engineering for commercetools in Leipzig, Germany. Use path mappings: src -> /var/If you only click out of the field, your input will be removed.next to the Servers field to create a new server.Ĭreate a Server Configuration for the PHP Docker container, configure Xdebug as the debugger and the path mapping that fits the folder structure within the PHP container It’s only important that you remember this key because we will use it later for the request to trigger the debugging.Ĭlick on the three dots. I usually choose something like IDEA_DEBUG. To be able to select this configuration, you may need to scroll down in the type selection popup (“Add New Configuration”) and click on “52 items more (irrelevant)” in order to find the type “PHP Remote Debug”.Ĭreate a Debug Configuration in IntelliJ IDEA Ultimate/PhpStorm of the type ‘PHP Remote Debug’ which connects to our PHP Docker container via XdebugĮnter an arbitrary key for Ide key(session id). src:/var/www/html/ ports : - "80:80" Configure IntelliJ IDEA Ultimate or PhpStormĬreate a Run Configuration of the type “PHP Remote Debug”. Version : '2' services : apache_with_php : build. Afterward, we have to configure Xdebug with some properties in the php.ini. Within the Dockerfile we install and enable Xdebug using pecl and docker-php-ext-enable. Therefore, we create an own Docker image based on the PHP/Apache image. Xdebug runs within the PHP container and connects to the Xdebug server controlled by IntelliJ IDEA Ultimate/PhpStorm Install and Configure Xdebug in the PHP Docker Containerįirst of all, we need to install and activate Xdebug in our PHP container. PhpStorm supports three main ways to initiate a PHP debugging session: You create a PHP Web Application debug configuration, and then PhpStorm uses its. But how can we debug the PHP code running in the container? In this post, I show you how to configure Xdebug in a PHP container and configure IntelliJ IDEA Ultimate or PhpStorm for remote debugging. Running PHP and an Apache in a Docker container is very handy for local development. Configure IntelliJ IDEA Ultimate or PhpStorm.Install and Configure Xdebug in the PHP Docker Container.Java Ecosystem, Kotlin, Engineering Management, Sociology of Software Development Debugging within a PHP Docker Container using IDEA/PhpStorm and Xdebug
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |