

Go to Run > Debug then select the configuration what we made earlier (PHP Remote Debug):Ĭ. Set breakpoint, and turning on Start Listening for PHP Debug Connectionī. Go to Run > Web Server Debug Validation, on Path to create validation script I point the value into my public path of project, and URL to validation script I point to my nginx docker host.Ī. Go to Run > Edit Configurations., create a new PHP Remote Debug configuration:ĭ. Go to Preferences > PHP > Debug > Dbgp Proxy, set like this (note: IDE Key must same with the value of xdebug.idekey on php.ini):Ĭ. In Intellij/PHPStorm go to: Languages & Frameworks > PHP > Debug > DBGp Proxy and set the following settings: Host: your IP address Port: 9000 Then youre all set and can start listening for PHP Debug connections from your IDE. Go to Preferences > PHP > Debug, set like this:ī. Dockerfile to build your XDebug-enabled version of the Wordpress container: FROM wordpress:latest RUN pecl install xdebug & docker-php-ext-enable. After selecting an Interpreter, we are going to map our working project with container path, my working project path is $HOME/DOO/api docker and I will map into /var/www/, so change the Docker container value:Ī.

This repository contains a script that can be used to easily install a PHP extension. Disable the Zend Debugger: Open the php.ini. Easy installation of PHP extensions in official PHP Docker images. To find out which version of the extension to download, click here. Go to `Preferences > PHP, add new interpreter, select new interpreter from Docker, vagrant, etc.Ĭ. Download Xdebug from Xdebug Downloads page. Here we want to configure our PHP docker interpreter.Ī. The Docker extension provides more support for debugging applications within Docker containers, such as scaffolding launch.json.I hope your container runs without any problems, then now we are going to configure PHPStorm.

Enter fullscreen mode Exit fullscreen mode
