plepicks.blogg.se

Download docker compose xdebug
Download docker compose xdebug









download docker compose xdebug

To test debugging, add a breakpoint in your header.php (click in the gutter by the line number to set a breakpoint at that line). First take down your container.Ĭhange the image line for wordpress to use the eceleste/docker-wordpress-xdebug image.

download docker compose xdebug

To set up XDebug in your container we need to modify docker-compose.yml. Try your hand at navigating in Visual Studio Code and editing some more by making a change to the header.php file of the active theme (probably twentyseventeen) and loading localhost:8999. Save the file and reload your browser window (or if it is pointed elsewhere, point it to localhost:8999/info.php). Edit the echo line to say something else. Open up info.php from the files list in the folder you opened in Visual Studio Code. In it select the Open folder… option, and select your mspwp folder. Going back to the top item in the lefthand sidebar ( Explorer) a Welcome screen should still be shown. You can install whatever extensions you’d like, but for the purposes of this tutorial make sure to install PHP Debug. To access these go to the Extensions area by clicking the square item at the bottom of items in the lefthand sidebar of the window. Visual Studio Code has a number of extensions. To install Visual Studio Code go to the Visual Studio Code download page. But to continue with this tutorial, for now leave it running. Or simply quit the Docker app from the menubar in this case when you relaunch Docker the containers (in this case, your WordPress site and its database) will automatically be ready to use. Here is the contents of the docker-compose.yml we used: The first part of our presentation showed how to create a WordPress install using the standard WordPress image. To install Docker go to the Docker download page. The remainder of this post is a reproduction of the tutorial document that they made available after the presentation to the user group (and this post is, for all intents and purposes, their own place to archive it for anyone to find in the future, and they hope for those who find it that it is useful to you). It was recognizing its potential so immediately that led them to want to share their finding with others. Only a week and a half before they gave their presentation they first began experimenting with Docker, and quickly recognized it as the future for their local development sandboxes of client (and personal) websites. Finally, they covered getting started with debugging using XDebug in VS Code. They demonstrated editing a site from Visual Studio Code. On February 23rd Eric and Alex gave a presentation at their local WordPress user group, MSPWP, on using Docker to mount local copies of WordPress sites for development.











Download docker compose xdebug