I started to roll my own for this too, but I got caught up in featurizing it and haven't manage to finish it up. Basically I was looking for something similar, but would do a check for $.browser.msie so that you wouldn't get an error in IE (while adding alternative output forms, like an alert or creating an output div). I also made primitive wrappers for timer() and profile() so that you could simply call either function twice and not have to worry about timer('name') + timerEnd('name'). I had planned on added a straight pass-through method to allow one to access the Firebug native methods unhindered, so you could do .log("%s is %d years old.", "Bob", 42) but I haven't started on that aspect yet.
If there's much interest I could try to clean up the code and release it for you guys. By the way, you can check for Firebug using: typeof window['console'] !== 'undefined' On 3/12/07, Daemach <[EMAIL PROTECTED]> wrote:
I would like to be able to dump the contents of the current selector to the console using $"#myselector").debug() without loading a plugin. Something as simple as the following would work, though if you devs have some ideas on how to make it more useful I'm sure it would be welcomed, especially by new users: jQuery.fn.debug = function() { console.log(this); return this; } Long chains that include callbacks with anonymous functions make it difficult to use console.log($()). Can this be added to the jQ codebase so it's always available? -- View this message in context: http://www.nabble.com/Please-add-a-basic-debug-function-to-the-jQuery-core...-tf3392275.html#a9443378 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/
_______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/