Simple bookmarklet to enable xdebug profiler

Recently we had xdebug installed in our development machine. To enable xdebug profiling we must must add XDEBUG_PROFILER=1 via GET or POST. Because I am lazy like many programmers I wrote bookmarklet to add this for me 🙂 Here is my code

javascript:var href=window.location.href;if(href.indexOf('XDEBUG_PROFILE')!=-1){window.location.reload()}else{if(href.indexOf('?')!=-1){window.location.href=href+'&XDEBUG_PROFILE=1'}else{window.location.href=href+'?XDEBUG_PROFILE=1'}}

Install notes:

Firefox: Create new bookmark and paste code (remove comments) to “Loaction” field and save it.

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.
This entry was posted in Programming and tagged , , . Bookmark the permalink.

One Response to Simple bookmarklet to enable xdebug profiler

  1. Pingback: Toggle XDebug Bookmarklet - Barren, Frozen Wasteland

Leave a Reply

Your email address will not be published. Required fields are marked *