jasalt / phel-wp-plugin

A simple skeleton to build a WordPress plugin using Phel (LISP).
GNU General Public License v2.0
2 stars 1 forks source link

XDebug support for container #7

Open jasalt opened 2 hours ago

jasalt commented 2 hours ago

Not on by default in the container but would be useful if not too painful to get working.

jasalt commented 2 hours ago

I had it half-way working with this Bitnami WordPress container back some time ago but fled to use Vagrant based dev setup. These were some notes I had on that. Commands were:

install_packages autoconf build-essential
pecl channel-update pecl.php.net
pecl install xdebug

Required adding and mounting php-conf.d/ having files:

20-error_reporting.ini

error_reporting=E_ALL

99-xdebug.ini

zend_extension=xdebug

[xdebug]
xdebug.mode=develop,debug
xdebug.client_host=host.docker.internal
xdebug.start_with_request=trigger
xdebug.log=/tmp/xdebug.log
jasalt commented 2 hours ago

@Chemaclass did you have experience with this? If you had this sort of thing working elsewhere maybe that would be good idea to setup here also, if it doesn't get too complicated.

I had some success stepping through the Phel Php sources earlier in vagrant box having it as a regular composer install, but the container mounts probably require some tricks with IDE folder mapping.

jasalt commented 2 hours ago

Also, I was thinking it might be good to have some sub-directory for the dev container related stuff if new folder needs to be added for this, to not bloat the root project dir. That would include then both docker-post-init-scripts and php-conf.d in eg. dev/ subdir.