Just make sure you have xdebug enabled ( ddev xdebug on). These should essentially “just work” as they run in a single process with no database, you don’t even need to be listening for connections. It's best to refer to the video above for these, but some brief info below. chrome:$DDEV_HOSTNAME Running and debugging tests Will be fixed in ddev soon.Ĭontainer_name: ddev-$ # DDev already sets this, add it here to debug Kernel tests. Add the following files then run ddev restart to regenerate the full docker-compose file. Fortunately we can extend the generated docker-compose file by adding extra files in the. There are a few extra parts we need for running every kind of test. For now you can revert ddev's docker-compose version with the following command:ĭdev config global -required-docker-compose-version=v1.29.2įor the most part DDev configures everything we need to use xdebug in PHPStorm. This defaults to v2 which still has some compatibility issues with PHPStorm. UPDATE JANUARY 2022 - Since v1.18.2 ddev now ships its own docker-compose version. Default config file - /var/www/html/phpunit.xml.PHPUnit library - Use Composer autoloader, set to absolute path in container, i.e.From the add dropdown choose PHPUnit by Remote Interpreter, then choose the one we set up already.CLI Interpreter: choose the interpreter we set up previously.Path to composer.json - absolute path on your local machine.You don’t need to map the web root or vendor dir since you’re mapping the entire project.home/michael/www/drupal -> /var/www/html Map the root of your project on your local machine to the absolute path on the docker container, e.g.Host: - must match the domain name of your drupal site.Uncheck Force break at first line when no path mapping specified - we’ll discuss this later when we start debugging Kernel tests.This setting allows us to listen on multiple ports. Note that xdebug 3 uses 9003 by default whereas xdebug 2 uses 9000. This should be set for you automatically. Lifecycle: Connect to existing container (‘docker compose -exec’).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |