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

Virtual properties are not getting listed #34

Open
ghost opened this issue Dec 16, 2017 · 0 comments
Open

Virtual properties are not getting listed #34

ghost opened this issue Dec 16, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Dec 16, 2017

I am not sure if this is a bug in the debugger extension or a limitation of Duktape itself, but it seems that virtual properties, defined like below, are not getting listed during object inspection in variables/watch windows.

duk_push_string(ctx, propertyName);
duk_push_c_function(ctx, getterFunction, 0);
duk_push_c_function(ctx, setterFunction, 1);
duk_def_prop(ctx, -4, DUK_DEFPROP_HAVE_GETTER | DUK_DEFPROP_HAVE_SETTER);

It is possible to inspect such properties, but they need to be explicitly referenced in the watch window or the debug console (e.g. obj.myVirtualProperty).

I think it would make sense if virtual properties were listed in the same way as regular ones.

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

No branches or pull requests

1 participant