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

Name functions to ease debugging #52

Closed
tombigel opened this issue Jun 30, 2014 · 2 comments
Closed

Name functions to ease debugging #52

tombigel opened this issue Jun 30, 2014 · 2 comments

Comments

@tombigel
Copy link

When looking at TweenMax object in Devtools they appear as r() for TweenMax and s() for TimelineMax.

The Functions can be easily names so they appear in their right names in the console, either by not using anonymous functions (i.e. using TweenMax = function TweenMax()) or by setting the 'name' property of the function.

See here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/name

@jackdoyle
Copy link
Member

It sounds like you're using the minified version. Have you tried using the regular (uncompressed) one while you're debugging? I'm not sure it'd be worth the extra kb to add method.name = (...) to the various classes, especially since it's an ECMAScript 6 specific thing. Perhaps I'm misunderstanding your suggestion though.

@tombigel
Copy link
Author

tombigel commented Jul 1, 2014

Look at the mdn link, they explain how to set names for functions and I'm sure you can instruct minifiers not to change the names. All I want is to see the right name in the console even using the minified version. 

Btw, the name property is supported by everyone but ie. 

Sent from Mailbox

On Mon, Jun 30, 2014 at 9:36 PM, jackdoyle notifications@github.com
wrote:

It sounds like you're using the minified version. Have you tried using the regular (uncompressed) one while you're debugging? I'm not sure it'd be worth the extra kb to add method.name = (...) to the various classes, especially since it's an ECMAScript 6 specific thing. Perhaps I'm misunderstanding your suggestion though.

Reply to this email directly or view it on GitHub:
#52 (comment)

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

No branches or pull requests

2 participants