carevorti.blogg.se

Phpstorm xdebug docker
Phpstorm xdebug docker







  1. #Phpstorm xdebug docker update#
  2. #Phpstorm xdebug docker for windows 10#

Test breakpoints in other locations in the core files directory. If yes, try stepping in and go a few levels deeper. Reload the index page and make sure the execution stops at the breakpoint. In your browser, activate the Xdebug Helper: Now, in the IDE toolbar, click the “Start listening for PHP Debug connections” button: Also, make sure that the daemon is exposed at port 2375 as described in the “Prerequisites” section earlier in this post.Īnother problem can happen when PhpStorm fails to start the service containers with an error message like this: To fix this, open Docker Desktop and check if there is any problem with the docker daemon. “Cannot connect: Cannot connect to the Docker daemon at tcp://localhost:2375. If the “Server” setting does not show “Docker”, it means that PhpStorm can’t connect to the Docker daemon.

phpstorm xdebug docker

However, you might want to check “–build, force build images” if your project has some changes that can affect the composition of the services’ images. This will open the “Create Run Configuration” dialog that looks like this:įor our project, there is nothing required to change in this dialog. To do that, in the project view right-click the file docker-compose-local.yml and select “Create docker-compose-local…”: We are now ready to launch the prepared WordPress project using PhpStorm Docker tools.įirst, we need to create a Run Configuration. The first one is for the database server: In an empty project folder, we create a docker-compose configuration file, docker-compose-local.yml. The tag used in this project is 5.4.1-php-7.2-apache. The project will use a container built from an official WordPress image. The companion repository for this tutorial can be found on GitHub: wordpress_xdebug Project Setup For simplicity’s sake, we will be debugging an existing theme BeOnePage Lite by BeTheme. The WordPress theme that is the subject of this development project can be a scratch-built custom one or a modification of an existing theme.

phpstorm xdebug docker

#Phpstorm xdebug docker update#

It should work also with newer versions: download the most recent WordPress and update the reference to the newer WordPress Docker image in the Dockerfile that is mentioned below. The version of WordPress we are going to work with is 5.4.1. To check if it is, go to Settings > Generaland tick the respective checkbox: Make sure the Docker Daemon is exposed on port 2375.

#Phpstorm xdebug docker for windows 10#

This tutorial is written for Windows 10 and Docker Desktop running Linux containers. You will need the Xdebug helper for Chrome or an equivalent helper for other browsers. In this tutorial, we are using version 2019.3.2. PhpStorm is a popular PHP IDE with many useful features including Docker and Xdebug support.









Phpstorm xdebug docker