I am developing a big web application in PHP, and recently switch to IntelliJ. IntelliJ offers the possibility to do remote debugging with XDebug, which was pretty easy to set up. Starting a request with ?XDEBUG_SESSION_START=intellij appended to the url starts off a remote connection from PHP to the listening IntelliJ debugger.
Xdebug looks for a cookie called XDEBUG_SESSION, which is used to initiate the back connection. The value is the idekey which is used to differentiate between different listening debuggers. I wasn’t able to go around this by setting it to an empty value for the resources I wanted to exclude. However, using a non-sense key seemed to work. I thus added the following code to my application: