Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stack trace URLs aren't hyperlinked (packages/logging/logging.js) #725

Closed
graemian opened this issue Feb 22, 2013 · 3 comments
Closed

Stack trace URLs aren't hyperlinked (packages/logging/logging.js) #725

graemian opened this issue Feb 22, 2013 · 3 comments

Comments

@graemian
Copy link
Contributor

@graemian graemian commented Feb 22, 2013

It really sucks to look at stack traces like this:

Screen Shot 2013-02-22 at 12 48 25 PM

Please could you make them look more like this (line numbers, hyperlinks, yay!):

Screen Shot 2013-02-22 at 12 49 26 PM

@svasva
Copy link

@svasva svasva commented Feb 22, 2013

That's because they aren't thrown as exceptions to the browser. This allows javascript to run further without being stopped by the browser and not confusing your website visitors. And since that is the browser who makes those traces pretty formatted that cannot be done in this way I guess.

Loading

@graemian
Copy link
Contributor Author

@graemian graemian commented Feb 22, 2013

I traced it into "packages/logging/logging.js" line 30. It seems WebKit only creates hyperlinks for the first element of the arguments array when you call "console.log.apply(console,args);". See below:

Screen Shot 2013-02-22 at 4 24 42 PM

This fixes it:

_.each(arguments,function(arg) { console.log.apply(console,[arg])});
//console.log.apply(console,arguments);

and produces the following output:

Screen Shot 2013-02-22 at 4 28 41 PM

I guess it's a WebKit bug, so I'll try to figure out how to log it there. None-the-less, it makes Meteor debugging a pain in the ass. I'd say it's worth working-around, as above.

Loading

@svasva
Copy link

@svasva svasva commented Feb 22, 2013

Nice! You could come up with a pull request or something.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants