codeenigma / ce-dev

Dev local stack handler
4 stars 2 forks source link

Make developer experience better for xdebug stepped debugging #176

Open philipnorton42 opened 5 months ago

philipnorton42 commented 5 months ago

I feel that we could improve ce-dev significantly by having a better experience when trying to use xdebug.

My experience of xdebug on ce-dev is normally:

There are probably far better ways of doing this, but if need to run a ce-dev provision step (for whatever reason) then I'll have to go through this process again. Occasionally, the network gateway address will change, which means I need to perform this process a second time.

This normally takes around 10-15 minutes per project, often battling with PHPStorm and the xdebug settings to see what I've missed. It will sometimes require me performing the same action to the cli and fpm xdebug configuration files when I want to use stepped debugging on the cli.

So, what would be good is a way of activating the xdebug stepped debugging using a ce-dev command (or even as part of the provision process) so that it "just works"TM.

It was suggested that we use an internal docker network identifier instead of the network gateway address, but I don't know much about this.

Secondarily to this, we should think about doing the same with the xdebug profiler as that can be invaluable in certain situations.

Happy to test anything out if needed!

DionisioFG commented 2 months ago

I think this ticket should be fixed in https://github.com/codeenigma/ce-provision/tree/2.x/roles/debian/php_xdebug, as part of the role installed xdebug