As we know, JavaScript is a pretty dynamic language, becuase it contains many implicit function calls: getter/setter, Proxy, Symbol.iterator etc.
As this project only handles explicit function calls, those implicit calls will meet unexpected behavior:
const run = vDebugger.debug(`// here's line 1
Object.defineProperty(globalThis, 'a', {
get: () => {
return 1
}
})
console.log(a === 1)
`, './test.js');
vDebugger.setBreakpoint('./test.js', 3); // break at line 3
run();
vDebugger.resume(); // should output "true", got "false"
const run = vDebugger.debug(`// here's line 1
const a = {}
a[Symbol.iterator] = function * () {
yield 1
}
for (const i of a) {
console.log(i)
}
`, './test.js');
run() // should output "1", got nothing
As we know, JavaScript is a pretty dynamic language, becuase it contains many implicit function calls:
getter/setter,Proxy,Symbol.iteratoretc.As this project only handles explicit function calls, those implicit calls will meet unexpected behavior: