DEV Community

Discussion on: Debug in PHP/Laravel Docker with xDebug

Collapse
 
bearveloper profile image
Bearveloper 🐻

Setting xdebug.start_with_request = yes will slow your server. You don't need to be in debug mode ALL the time. My recommendation is to update it to trigger; this will have a side effect though, PHP will not start a debug session unless you specifically ask for it, so you will need a browser extension to toggle the debug mode on and off.

Aside from the trigger mode, I also recommend you to add an extra mode, develop to get better error messages.

xdebug.mode=debug,develop
xdebug.start_with_request=trigger
Enter fullscreen mode Exit fullscreen mode

Sources: