On Thu, Jun 25, 2020 at 2:35 AM Nupoor Kotasthane <nupoor2...@gmail.com> wrote:
>
> I also notice that the 'this' object in the Debugger.CallFrame objects have 
> their 'type' set to 'undefined' when debugging ES6 modules. I also notice 
> that the variables declared in the starting module are missing from the scope 
> when I try to inspect the scope object with Runtime.getProperties.  Is this 
> expected behavior?
>
>
>
> On Tuesday, June 23, 2020 at 2:56:57 PM UTC-7, Nupoor Kotasthane wrote:
>>
>> Hi Ben,
>>
>> We have embedded V8 version 6.7 in our product. We use it to run and debug 
>> JavaScript. While debugging scripts is working okay, debugging ES6 modules 
>> using the inspector has this one problem. When using 
>> Debugger.evaluateOnCallFrame to inspect variables we keep getting an 
>> inspector response with reference errors saying the variables are not 
>> defined. This is true for all locally declared variables within the current 
>> scope in the "mjs" module (I do not see this problem with the imported 
>> module, only the importing module).
>>
>> It seems like symbols are not generated for the importing 'mjs' module. So 
>> do we have to do anything special for modules for this to work? I can share 
>> my example if and inspector responses if that will help.
>>
>> Thanks,
>> Nupoor

It's possible I'm misunderstanding you but it sounds like it's working
as expected.

ES modules run in strict mode. Function calls (not method calls) have
`this` set to `undefined`, and top-level variables are local to the
module, not global.

If that's not what you mean, can you share some example code and
expected vs. actual output?

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAHQurc8RiJDLyAeuteKuYmzpxNUQXwJSoSKmhE0dyrCSB1d%3DBA%40mail.gmail.com.

Reply via email to