chakra-core / chakra-core/ChakraCore
Module namespace object when examined in debugger has no value, type, etc.
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
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:
```js
(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:
```json
{"name":"b","type":"object","className":"Object","display":"{...}","propertyAttributes":3,"handle":2}
```
Module namespaces on the other hand, look like this:
```json
{"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.
Contributor guide
Assessment
This issue has not been assessed yet.