jQueryLog new debugging extension for jquery (feedback request)

jquerylog

Grünschnabel
Hello,

I'm sorry for posting this in English but I live in Luxembourg and am currently still learning both LB and DE :( So it must be in english.

I've just released this yesterday and I'm looking for reviews.
It's an edit to jQuery to allow chain logs for faster and simpler debugging.

Pretty much it allows to log both the selectors and return values when doing function chains on jQuery.

This project is pretty new so if you want to blog or tweet about it I would apreciate it as, with more ppl using it and more feedback flowing in I'll be able to get it much better.

One of the functionalities I wish to add in the future is throwing the logs via AJAX so you can debug stuff running on your users interface.

The project's site is http://www.jquerylog.com hope this can be usefull for many big jquery engineers such as myself. If you feel the examples on the page are not good enought please tell me so I can improve them (both here or as a comment on http://blog.jquerylog.com)

My idea is when having a bug in jquery I ended up doing the following
$("#foo").parents(".t1").find(".t2:last ."+someString+":last").text("test"); // chain with a bug

console.log("#foo");
console.log($("#foo"));
console.log(".t1");
console.log("$("#foo").parents(".t1")");
console.log(".t2:last ."+someString+":last");
console.log($("#foo").parents(".t1").find(".t2:last ."+someString+":last"));

Writing this was very frustrating, as I guess many already went through it, I've edited jQuery and now released it so others can also use it.


The project's site is http://www.jquerylog.com hope this can be usefull for many big jquery engineers such as myself. If you feel the examples on the page are not good enought please tell me so I can improve them (both here or as a comment on http://blog.jquerylog.com )

/Francisco

Btw any replies please do it in english otherwise I'll have to google translate them :p

And also I don't want to seem imposing. If you feel this is not the place to ask for feedback just tell me or remove the post, no hard feelings on it.
 
First off: I like the idea and I understand your motivation. I like that it's on GitHub (I'm watching it) and that it solves an actual problem.

But: It really should be a plugin and not a replacement. It would be much easier to maintain. Plus you used some deployment-ready jQuery version as your base, but if your plan was to create a fork of jQuery, which allows logging, than acutally fork jQuery and use the seperated source files (https://github.com/jquery/jquery/tree/master/src) instead of one big file.

Either make it a plugin separated from the core or a fork of jQuery (which would automatically benefit from bugfixes).
 
Hey, thanks for the reply :)
The reason why I'm using the one big file with all jquery in it. It's to have access to the main closure. I considered making the pluggin, but this: http://happygiraffe.net/blog/2007/09/26/jquery-logging/ is the best I could also do. The flexibility needed to effectively log both selector and return values, it's impossible without injecting code directly into the source :(

But you're right, this weekend i'll update it with a fork of jQuery main repo. It will be easy to merge also :) thanks
 
The reason why I'm using the one big file with all jquery in it. It's to have access to the main closure.

But that's the beauty of JavaScript. You can manipulate the jQuery core with a Plugin and inject your own code.

I hacked this example so you can see what I mean.

I just made a GitHub project out of my example https://github.com/Prinzhorn/jquery-inlog


You get the idea. There's another thing I don't quite like about your output. It's way too verbose. No need for "Entering" or "with selector". That's why we use curly brackets and semicolons ;-)
 
That's actually a great idea. Coding js for near 4 years now I should had remembered that, thanks. Keep the github up so I can re-check it in the weekend when I continue the code on jquerylog.

I haven't had time to update it. But today I'll add the new version during the afternoon, already taking into account your suggestions. Thanks :)

Hey, I see that you're keeping to develop your plugin and with quite sucess :) as I don't have as much time to develop mine, I'll add a link from my github and my jquerylog.com site to your github. I'll keep updating mine though I'll try to diverge in terms of functionality so we don't both swim in the same direction.

and tks for the reference in the "original idea taken from"
 

Neue Beiträge

Zurück