Skip to content

Module namespace object when examined in debugger has no value, type, etc. #5499

@fatcerberus

Description

@fatcerberus

I had an issue with my debugserver crashing when attempting to examine module namespace objects, so I investigated. It turns out that the ChakraCore debugger serializes module namespace objects quite a bit differently than it does for any other object.

I ran the following in miniSphere while under control of SSj:

(async () => {
	let a = await import('sphere-runtime');
	let b = { pig: 812, cow: 1208, ape: -128 };
	debugger;
})();

I added a bit of code to miniSphere to print the JSON.stringify'd object returned by the debugger.
Normal objects are serialized like so:

{"name":"b","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":2}

Module namespaces on the other hand, look like this:

{"name":"a","propertyAttributes":3,"handle":7}

Note in particular the missing type. There's no way to determine what kind of value this even is.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions