apolopena / gitpod-laravel-starter

Configurable LAMP or LEMP stack starter project powered by Laravel and Gitpod. Supports Laravel 6, 7, and 8. Out of the box support for React, Vue, and Bootstrap frontends, with or without built-in auth .
https://github.com/apolopena/gitpod-laravel-starter/wiki
MIT License
40 stars 44 forks source link

xdebug fallsbacks too often #162

Open apolopena opened 2 years ago

apolopena commented 2 years ago

Describe the bug

The xdebug log show this when it first starts up and debug_on or debug_off is called:

[5382] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[5382] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating
[5382] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[5382] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating
[5382] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[5382] [Config] INFO: Trigger value for 'XDEBUG_SESSION' not found, so not activating

Screenshots

Steps to reproduce

Expected behavior

Additional information

apolopena commented 2 years ago

This is expected behavior. xdebug falls back to XDEBUG_SESSION when using XDEBUG_SESSION_START in a GET request which is the mechanism we use to toggle xdebug sessions on and off. The alternative would be to use XDEBUG_SESSION in a get request instead of XDEBUG_SESSION_START but is unecessary due to the fallback mechanism that xdebug uses.

apolopena commented 2 years ago

Reopening since the xdebug fallback mechanism makes multiple calls and fallback on every trigger of a debug session and everytime something is debugged. This is an optimization.

apolopena commented 2 years ago

This optimization requires a full refactoring of the debug_on and debug_off browser funtions as well as all xdebug configs.