We don't need a wrapper. L3D is built such that drush gets executed inside the Wodby PHP container, which is already prepare for XDebug and that works with PhpStorm without any problems. By default, L3D starts with debug turned off, because everything is faster. When you want to start debugging you can call ahoy debug on which quickly updates the settings for the PHP container and all is ready to go. When you're finished, call ahoy debug off and you're back to faster operations.
The PhpStorm config looks like this:
For the server, it's important that the name is set to Docker and the path mapping goes from your project root to always /var/www/html:
That's it, nothing else is required and debugging just works - both for PHP cli (i.e. drush) and for web browsers.
Let's mark this with the documentation label as well so that we add this to the wiki too.
hi, thx for that. however i think you didn't fully answer. The question was, how to debug if the request come from cli, especially drush. Or do you enable xdebug with ahoy debug on on any php, including fpm and cli?
Quote from the documentation link: "With this setup, you can debug both web requests coming from the browser and CLI commands for PHP which is executed inside the PHP container like e.g. drush - all with the same setup."