WeareJH / wf2

PHP environments for Magento 1, Magento 2 & Wordpress
6 stars 3 forks source link

Add xdebug profiling support #100

Open mikeymike opened 4 years ago

mikeymike commented 4 years ago

Adds support for profiling.

Unable to test compile due to a bunch of I think unrelated errors.

Also this relies on new PHP image builds

shakyShane commented 4 years ago

@mikeymike do you mean errors in the PHP builds, because the builds here look good

mikeymike commented 4 years ago

Nah my local builds... I need to sort out my Rust installation again

shakyShane commented 4 years ago

@mikeymike so this is ready to go? not sure if anythings else is needed etc

mikeymike commented 4 years ago

I think it's ready, images have been released a while back now 😄

shakyShane commented 4 years ago

@mikeymike have you considered how this interacts with ‘wf2 xdebug enable’ etc? Or perhaps it has no effect?

mikeymike commented 4 years ago

That's a good point, I didn't really look at the implementation details around that now you mention it.

This updates the NGINX though so maybe it does?

mikeymike commented 4 years ago

So I just had a look at the implementation of xdebug enable/disable and I they're compatible.

This PR introduces a map to choose debug or non debug upstreams. The current xdebug enable command keeps the same upstream keys but changes where they go so they're both pointed to php-debug.

So in the event of running xdebug enable regardless of where the map decides the upstream is we'll still always end up in the debug container anyway which is the intended result.

tldr looks good to me