This Question is Answered

2 "helpful" answers available (2 pts)
2 Replies Last post: Jul 8, 2014 1:27 AM by Newbie  
Newbie Newbie 50 posts since
Jul 6, 2012
Currently Being Moderated

Jul 5, 2014 4:16 AM

How to keep debugging enabled across browser sessions?

I'm using XDebug to debug PHP scripts and have run into a problem. I'm using Internet Explorer at the moment to debug a problem with a login script and when I close the browser and reopen it, the XDEBUG cookie is no longer set. This is a problem because since I'm debugging a login script that runs when the page opens, I need breakpoints to trigger when the browser is opened (I can't open the browser and then click the bookmarklet because by that time the script has already run).


Is there any way to keep the cookie set across browser sessions (i.e. after closing and reopening IE)?

Andriy Bazanov Master 5,108 posts since
May 28, 2010
Currently Being Moderated
Jul 5, 2014 2:05 PM in response to: Newbie
Re: How to keep debugging enabled across browser sessions?

Hi there,


Set xdebug.remote_autostart = 1 in your php.ini. This will tell xdebug to attempt to debug every single request regardless of xdebug cookie presence.


Note: If debugging client is not available (IDE is closed or not listening for debug connections) you will see around 1 sec delay in execution while xdebug attempts to establish debug connection.




As for cookies-only approach -- edit cookie in your browser manually and remove "this sesssion only" attribute (you can also extend expiration time, if desired). This will make cookie surviving that browser restarting.

More Like This

  • Retrieving data ...