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

Constructor names visible in debugger #1000

Closed
cjloong opened this issue May 19, 2014 · 8 comments · Fixed by #1251
Closed

Constructor names visible in debugger #1000

cjloong opened this issue May 19, 2014 · 8 comments · Fixed by #1251
Assignees
Milestone

Comments

@cjloong
Copy link

cjloong commented May 19, 2014

VOTE HERE

Hi I am having some issue with names here.

Code:

    can.Control("Test.FullName",{},{});
    var fixture2 = new Test.FullName();
    debugger;

In debugger I dump 2 variables:

fixture2.constructor.name

Output: "Constructor"

fixture2.constructor.fullName

Output: "Test.FullName"

I am using latest pull from git. The older pull gives null as fullname

@justinbmeyer
Copy link
Contributor

What is the issue? It doesn't set constructor.name.

@cjloong
Copy link
Author

cjloong commented May 20, 2014

yes.

@DVSoftware
Copy link
Contributor

I fixed this issue here #1009
Yes, i know eval is evil, but should be safe to use in this case. It's handy because it allows easier profiling with Chrome developer tools, as we can filter by class name. It would previously display "Constructor" for all classes.

@justinbmeyer
Copy link
Contributor

@DVSoftware Thanks for submitting this pull request. I understand the use case, but I'm wary of using eval. There are many environments that would forbid this.

Is displayName supported in Chrome? https://code.google.com/p/chromium/issues/detail?id=17356

@DVSoftware
Copy link
Contributor

@justinbmeyer unfortunately, not yet :(

@DVSoftware
Copy link
Contributor

@justinbmeyer What do you think about enabling it only in dev mode?

@justinbmeyer
Copy link
Contributor

I'm fine with that. Can you submit a pull request for that?

@justinbmeyer justinbmeyer added this to the 2.2.0 milestone Jul 23, 2014
@justinbmeyer justinbmeyer changed the title Name not working Constructor names visible in debugger Aug 26, 2014
@ccummings ccummings self-assigned this Sep 2, 2014
@ccummings
Copy link
Contributor

I'll wrap this with the necessary tags to make it only work in dev mode.

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

Successfully merging a pull request may close this issue.

5 participants