I'm not a Firebug expert, but this seems to work: $.fn.log = function (brk){ console.log(this); if (brk) debugger; return this; };
So now $(...).log() puts the jquery object on the console and .log(true) also drops into the debugger (equivalent to setting a breakpoint). I'm not sure how to add a value to the watch list; when I use the above plugin 'this' and 'brk' are on the watch list but they go out of scope when it returns Danny On Dec 28, 2:59 pm, "Mike Schinkel" <[EMAIL PROTECTED]> wrote: > Danny wrote: > > For quickie debugging to FIrebug, you could define > > > $.fn.log = function { console.log(this); return this;}; > > > and now you've got a chainable log that you can put anywhere in the > > chain: > > $('p').log().css('color', 'red').log().slideDown() etc. > > > I haven't tested this (I'm sitting in front of IE 7) but it > > ought to work. > > Nice. Anyone know if there is a way in code to trigger a Firebug breakpoint > and also add a value to the watch list if it isn't already there? > > -- > -Mike > Schinkelhttp://www.mikeschinkel.com/blogs/http://www.welldesignedurls.orghttp://atlanta-web.org