Created
October 28, 2015 15:25
-
-
Save jnonon/be8deaa904596a102c75 to your computer and use it in GitHub Desktop.
Setting XDebug session ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setXdebugSessionCookie(sessionId) { | |
var now = new Date(); | |
var time = now.getTime(); | |
var expireTime = time + 1000*36000; | |
now.setTime(expireTime); | |
document.cookie = 'XDEBUG_SESSION='+sessionId+';expires='+now.toGMTString()+';path=/'; | |
console.log(document.cookie); | |
} | |
//Use: Assuming your session id for XDebug is 12345, then setting the cookie setXdebugSessionCookie(12345) will allow to debug AJAX calls. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment