

Luckily most of the cloud providers supply us with tools to ease this pain, for example, the SAM CLI by Amazon Web Services. This setup can be a bit of a struggle with serverless development because the platforms that run our functions are in the cloud and uploading to test isn’t exactly what I would call quick. home/jmcd/dev/project1/src/Controller/PagesController.When we build software, it’s always good to get a quick development cycle running. Hostname: is set so the XDebug client in VSCode will listen to the docker IPv4 Address of the Linux host /src/Controller/PagesController.php

home/jm/onedrive/sites/100pbc/.vscode/launch.json on the remote linux host Ĭheck your setup by adding a file with phpinfo() into somewhere accessible to your containers Webserver. **Note: ** xdebug.remote_host didn’t seem to work perhaps it is an old version 2 setting. Set xdebug.client_host to the docker IP address of the Linux host Note: Make sure you restart the container when you make changes. Adding the configuration to both the apache and cli areas allows you to debug your tests from the command line as well as get debbugging information when navigating your site via a browser. Use the install instructions that come in the php-debug extension in VSCodeĪdd the following to /etc/php/7.4/apache/php.ini and /etc/php/7.4/cli/php.ini in the Docker container. In the docker container compile and install Xdebug 3 You also need "Visual Studio Code Remote Development Extension Pack" to allow for SSH to remote host.

VScode instance running on Windows 10 Pro install the PHP Debug extension by Felix Becker ext install php-debug.Project files on Linux host: /home/jm/onedrive/sites/100pbc Path to project files in docker container: /var/www/100pbc VSCode Extensions The Linux Host has the project files and there is a docker container running on the Linux Host which provides the LAMP stack development environment. I’m connecting from VSCode running on Windows 10 Pro to the Linux host via SSH.
