diff --git a/src/frankenphp-symfony/src/Runner.php b/src/frankenphp-symfony/src/Runner.php index afb704d4..c1c12645 100644 --- a/src/frankenphp-symfony/src/Runner.php +++ b/src/frankenphp-symfony/src/Runner.php @@ -33,8 +33,8 @@ public function run(): int $server['APP_RUNTIME_MODE'] = 'web=1&worker=1'; $handler = function () use ($server, &$sfRequest, &$sfResponse, $xdebugConnectToClient): void { - // Connect to the Xdebug client if it's available - if ($xdebugConnectToClient) { + // Connect to the Xdebug client if it's available and the XDEBUG_SESSION cookie is set + if ($xdebugConnectToClient && isset($_COOKIE['XDEBUG_SESSION'])) { xdebug_connect_to_client(); }