Skip to content

Instantly share code, notes, and snippets.

@jtdp
Last active February 10, 2021 18:57
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jtdp/5451525 to your computer and use it in GitHub Desktop.
Save jtdp/5451525 to your computer and use it in GitHub Desktop.
XDebug Snippets
// From http://www.jetbrains.com/phpstorm/marklets/
// Start XDebug Debug Session
javascript:(function(){document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';})()
// Stop XDebug Debug Session
javascript:(function(){document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
// Debug Current Page
javascript:(function(){document.cookie='XDEBUG_SESSION='+'PHPSTORM'+';path=/;';document.location.reload();document.cookie='XDEBUG_SESSION='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
// Start Profiler
javascript:(function(){document.cookie='XDEBUG_PROFILE='+'1'+';path=/;';})()
// Stop Profiler
javascript:(function(){document.cookie='XDEBUG_PROFILE='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
// Start Tracer
javascript:(function(){document.cookie='XDEBUG_TRACE='+'1'+';path=/;';})()
// Stop Tracer
javascript:(function(){document.cookie='XDEBUG_TRACE='+''+';expires=Mon, 05 Jul 2000 00:00:00 GMT;path=/;';})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment