I am trying to remotely start debugger in multiple microservices using Phalcon, the first microservice accepts XDEBUG_SESSION_START header but I cannot get the header in the request when I instantiate the Request object so I guess that Apache is removing it after the debugger starts.
Is it exists any option or way to disable this behavior and make the Phalcon code know when the Xdebug flag is present in the Request in order to forward that flag when calling other microservices?
I know that I can set auto_start option for Xdebug but that option seems to slow down the microservices.
The final code should looks similar to:
$DEBUG = $request.getHeaders()['XDEBUG_SESSION_START']
if (!is_empty($DEBUG)) {
$headers['XDEBUG_SESSION_START'] == 1;
}
....
I think this would be OK and it will not cause problems even when code will be deployed to PROD environments.