Two xdebug sessions


I'm facing a problem: The application I'm currently working at is split into a frontend and a backend comnponent communicating via json rpc, both running on my local dev machine (macos). My idea was to set


in php.ini, and then start a remote debugging session with the idekey xdebug. The frontend works, the backend also connects to Phpstorm, but the debugging doesn't really start: Debugger > Variables changes from "Waiting for incoming connection with ide key 'xdebug'" to "Connected", and the browser hangs until timeout.

If I put "php_admin_value xdebug.idekey xdebug-backend" into the backend's apache vhost and start a debug session with idekey xdebug-backend, the backend can be debugged like a charm.

What would you guys suggest? I would love to be able to have both components connect to Phpstorm with the same idekey to be able to step debug from the frontend to the backend and back to the frontend.


1 comment
Comment actions Permalink

Hello Ingmar,

Sorry for delay.

We implemented handling of incoming debug connection with the same ide key in FIFO order because in applications which use AJAX extensively you can get a new tab for incoming debug connection every second.
But unfortunately it doesn't work for some cases. Currently your approach is the only possible workaround. Please vote the for the following issue -

Thank you for feedback!


Please sign in to leave a comment.