Subscribe to RSS Feed

Several posts already announced fresh new release of Firebug 1.5 (!) and so, let me focus on one new cool feature that comes with the combo Firebug 1.5 + Firecookie 1.0.

Firecookie is an extension to Firebug that allows managing cookies in your browser. Latest 1.0v has been also just released on AMO and it's fully compatible with Firebug 1.5.

Since Firebug 1.5, introduces a new Break on next feature (among other things) that can be used to break Javascript execution on various events (e.g. on XHR) fired by the current page, it was straightforward that this can be also useful for debugging cookies.

Break On Cookie Change

The purpose of the feature is to break JS execution when a cookie on the current page is modified and show the Javascript source line that caused it (using the Script panel). This is useful especially in cases when the developer doesn't entirely know the source code (perhaps written by somebody else) and wants quickly find the related piece of code.

To activate the feature, select the Cookies panel and click on Break On Cookie Change button.

As soon as a cookie on the current page is modified, Firebug debugger halts and the Script panel is activated.

Cookie Breakpoint

If the developer is interested only in one specific cookie, a cookie breakpoint can be created by clicking on the breakpoint column, just like in case of a regular JS breakpoint.

So, if this particular cookie is modified the debugger stops JS execution showing what line of source code is the culprit.

Conditional Breakpoint

In order to break only under some circumstances, a breakpoint condition can be specified. Just right click on the breakpoint to show a condition editor.

The breakpoint will stop only if the expression is evaluated to true. Note that you can use following cookie properties in the expression (as built in variables): value, path, host, expires [ms], isHttpOnly, isDomain.

Rss Commenti


  1. [...] Software is hard | New Firebug 1.5 & Debugging Cookies – view page – cached More musings on software development [...]

    #1 Twitter Trackbacks for Software is hard | New Firebug 1.5 & Debugging Cookies [] on
  2. Awesome! Thanks for your hard work Honza!

    #2 Antonin Hildebrand
  3. [...] Software is hard | New Firebug 1.5 & Debugging Cookies [...]

    #3 Columbus Blue Jackets Vs Philadelphia Flyers NHL Hockey odds … | Philadelphia Flyers NHL Announcer
  4. Very Cool!!

    #4 Erik Vold
  5. [...] Software is hard | New Firebug 1.5 & Debugging Cookies [...]

    #5 Syser Kernel Debugger Enterprise 1.99.1900.1138 | DevBlogr
  6. [...] I’ve been using Firebug 1.5 since it was an alpha and now I’m using Firebug 1.6 alpha with Firefox 3.6. I’ve been also using Firecookie for a very long time now, but never realized about this: you can put breakpoints on cookies to detect changes! [...]

    #6 : Debugging cookies with Firebug 1.5/1.6
  7. [...] New Firebug 1.5 & Debugging Cookies January 20, 2010 By Jan Odvarko [...]

    #7 Firebug Demystified | EMDMA

Sorry, the comment form is closed at this time.