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

Comments

Projects
None yet
5 participants
@cjloong

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

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer May 19, 2014

Contributor

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

Contributor

justinbmeyer commented May 19, 2014

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

@cjloong

This comment has been minimized.

Show comment
Hide comment
@cjloong

cjloong commented May 20, 2014

yes.

@DVSoftware

This comment has been minimized.

Show comment
Hide comment
@DVSoftware

DVSoftware May 22, 2014

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.

Contributor

DVSoftware commented May 22, 2014

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

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer May 22, 2014

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

Contributor

justinbmeyer commented May 22, 2014

@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

This comment has been minimized.

Show comment
Hide comment
@DVSoftware

DVSoftware May 22, 2014

Contributor

@justinbmeyer unfortunately, not yet :(

Contributor

DVSoftware commented May 22, 2014

@justinbmeyer unfortunately, not yet :(

@DVSoftware

This comment has been minimized.

Show comment
Hide comment
@DVSoftware

DVSoftware May 22, 2014

Contributor

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

Contributor

DVSoftware commented May 22, 2014

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

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jul 23, 2014

Contributor

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

Contributor

justinbmeyer commented Jul 23, 2014

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 from Name not working to Constructor names visible in debugger Aug 26, 2014

@ccummings ccummings self-assigned this Sep 2, 2014

@ccummings

This comment has been minimized.

Show comment
Hide comment
@ccummings

ccummings Sep 25, 2014

Contributor

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

Contributor

ccummings commented Sep 25, 2014

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