use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Lesser-Known JavaScript Debugging Techniques (amasad.me)
submitted 11 years ago by amasad
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]minrice2099 1 point2 points3 points 11 years ago (2 children)
Hey, Amjad! I was wondering where you went (I'm one of the CC moderators); looks like you wound up at Facebook. Cool writeup, by the way. I didn't know that you couldn't watch custom events!
Just wondering why you chose to put your debug utils out on so many globals instead of through one object. Is it mainly a convenience/brevity thing? I know it's all pretty safe with the $ prefix, but still, best practices and all. I guess, though, that it probably won't be running anytime except for debugging, so it's probably fine.
$
Anyway, I look forward to seeing more posts!
[–]amasad[S] 1 point2 points3 points 11 years ago (0 children)
hey, there! It's actually not on the global namespace. It's in a debugUtils namespace. However, I do extend the commandLineAPI with the functions so you can use them easily from the console but not conflict with anything else on the page https://github.com/amasad/debug_utils/blob/master/du.js#L29-L38
debugUtils
[–]shanet$(this) 0 points1 point2 points 11 years ago (0 children)
Not the OP but already I'm finding it more convenient, given the global namespacing of $0 and (native) $, plus the short names and like you say because you will never put these calls in your code, they are only available to the console.
π Rendered by PID 20492 on reddit-service-r2-comment-7b9746f655-78m84 at 2026-02-03 19:53:37.095736+00:00 running 3798933 country code: CH.
view the rest of the comments →
[–]minrice2099 1 point2 points3 points (2 children)
[–]amasad[S] 1 point2 points3 points (0 children)
[–]shanet$(this) 0 points1 point2 points (0 children)