Two xdebug sessions
Hi,
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
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.idekey=xdebug
xdebug.remote_host=127.0.0.1
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.
Cheers,
Ingmar
Please sign in to leave a comment.
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 - http://youtrack.jetbrains.com/issue/WI-7355
Thank you for feedback!