There is also an awesome community project that utilizes ddev with Gitpod and makes things much easier. Be sure to check it out first from below! https://ddev.github.io/ddev-gitpod-launcher/ With it, you can run XDebug out of the box, change PHP versions on the fly, and much more!
Repository | Description | Try it |
---|---|---|
symfony-demo | A PHP/Symfony reference application following best practices | |
magento2gitpod | Magento 2 optimized setup for Gitpod: Nginx, MySQL, PHP 7.2, PHP-FPM and more | |
koel | A personal music streaming server that works | |
drupal | Drupal 9 with MySQL, suitable for site building and contrib module development | |
phpmyadmin | A phpMyAdmin example with Node.js, a REST API and MySQL for data persistence |
.gitpod.yml
configuration file, like so:
Run and Debug
on the left hand side and have fun debugging PHP! You can also create a launch.json
file.
Finally, here is a full example repository containing the complete Gitpod PHP debug configuration described above. You can try it by clicking here:
sudo pecl install <EXTENSION>
in your repository’s .gitpod.Dockerfile, e.g. like so:
<EXTENSION>
is the PHP extension you want to install, e.g. xdebug
.