![]() ![]() You can include the xdebug install in your Dockerfile. This is a basic config that works for me, when using VS Code with felixbecker's XDebug extension. I'm using the official Wordpress Docker image just as you are, and it took a while to dig up the reason why suddenly xdebug.remote_host doesn't work anymore, and why my logs aren't showing up. You'll find that various config keys have changed, including ones that are vital in running XDebug from a Docker container. Please note that version 3 of XDebug has introduced a fair amount of config name changes that are not backwards compatible. ![]() Could it be installing (and activating) a never version, version 3.x instead of the 2.x you've specified? That was the grief in my case. Actually there are lots of resources out at your php -ini output, it looks like your XDebug is already running. Let me know if you also need help with setuping the phpstorm remote debugging.If its not working enable xdebug log, add xdebug.remote_log=/log_path/xdebug.log to xdebug.ini will help to diagnose the issue.This is one way of getting xdebug works.To make sure xdebug config loaded, log into container and run php -ini | grep xdebug.Then configure phpstorm remote debugging with xdebug.ini details.php-ini-overrides-dev.ini/xdebug.ini:/etc/php/7.1/mods-available/xdebug.ini This is how my docker-compose file looks like version: '2' Xdebug.remote_port=10000 # dont use 9000 its usually used by the php-fpm I keep this file in my host machine and copy it with volumes. You might need to create the xdebug.ini file with your remote host details, i'm using phpstrom this is what my xdebug.ini looks like.Build your-wordpress image from that Dockerfile.Create a Dockerfile with xdebug installation for the development, dont use this for production, it will slow down your performance.Then check is xdebug is installed in the container.First you are using wordpress:latest so you have to find which php.Anyone hav any insights that may help me? I've gone through several tutorials and haven't been able to figure this out. Xdebug.var_display_max_children => 128 => 128 ace_enable_trigger_value => no value => no value Xdebug.show_exception_trace => Off => Off Xdebug.remote_log => no value => no value Xdebug.remote_addr_header => no value => no value Xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p Xdebug.profiler_output_dir => /tmp => /tmp Xdebug.profiler_enable_trigger_value => no value => no value Xdebug.profiler_enable_trigger => Off => Off Xdebug.gc_stats_output_name => gcstats.%p => gcstats.%p Xdebug.gc_stats_output_dir => /tmp => /tmp Xdebug.force_display_errors => Off => Off Xdebug.filename_format => no value => no value Xdebug.file_link_format => no value => no value usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini, ![]() When I run the command php -ini | grep xdebug my output is as follows: php -ini | grep xdebugĬannot load Xdebug - it was already loaded I have also set the Debug Port to 9001 as I did in my xdebug.ini file: Within PHPStorm I have set the debug settings like so:Īnd I have set up the server mapping like so: Where my xdebug.ini file that is within my docker-config directory locally looks like so: zend_extension=xdebug.so Then my Dockerfile which I have tagged as web-build-scripts (and built of course) looks like this: FROM wordpress:latestĬOPY Search-Replace-DB/. plugins/XXXXX:/var/www/html/wp-content/plugins/XXXXX plugins/XXXX:/var/www/html/wp-content/plugins/XXXXX themes/XXXXX:/var/www/html/wp-content/themes/XXXX Here is my current docker-compose.yml file: version: '3' I'm trying to do this within the context of this WordPress image. I'm using PhpStorm IDE and the Docker image I'm using installs PHP 7.2. I am trying to set up Xdebug with docker-compose. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |