问题
This is a bit specific situation, I wonder if anyone else has encountered the following:
Chrome starts stalling when xdebug session cookie is set. The cookie might be leftover from previous debugging, all requests (ajax or "normal") slow down (15 seconds to 2 minutes before starting to receive), when debugging is not in use. I use PHPStorm for debugging, but it makes no difference if phpstorm is running or not when the stalling takes place.
EDIT: Steps to reproduce the stalling:
- Open php storm project and start debugging (index.php in my case)
- Set some breakpoints and refresh the page in chrome
- Run over the breakpoints until finished
- Click "stop debugging" on php storm
- Refresh the page in chrome (and this is where the stalling starts)
Once the stalling starts, the chrome tab will become a bit unresponsive, but it can be closed.
Manually removing the XDEBUG_SESSION cookie (between steps 4 and 5) fixes the problem, but I'd really like a working solution. One solution might be switching to other browsers as I have not experienced such slowdown on IE or FF, but I really like working with chrome.
EDIT: I also managed to create a bookmarklet that deletes the cookie, but even that solution does not satisfy me in this situation, as I must remember to click the bookmarklet before trying to navigate any further, otherwise chrome will stall once again.
The biggest annoyance is that I don't understand WHERE the stalling takes place, on the chrome (client) side or at the server side. I am suspecting chrome as this does not happen with other browsers.
I am placing a bounty on this, I want to know if there is something XDEBUG-related in chrome, and if either party (xdebug or chrome/chromium) can do anything about this bug.
The bounty on this question has ended, and there are no answers to award it to.
来源:https://stackoverflow.com/questions/30207635/workaround-stalling-chrome-when-xdebug-session-cookie-set