- Version:
v12.1.0, although seems to apply to older versions too - Platform:
macOS - Subsystem:
inspector or vm
Demonstrating the issue from the title:
constinspector=require('inspector')constvm=require('vm')constsession=newinspector.Session()session.connect()constctx=vm.createContext({a: 100})a=100session.post('Runtime.evaluate',{expression: 'a',throwOnSideEffect: true,contextId: 2// ctx's id},(error,res)=>{console.log(res)if(res.exceptionDetails&&res.exceptionDetails.exception.description.startsWith('EvalError: Possible side-effect')){process.exit(1)}})^ exits with code 1, even though the provided expression a is clearly causing no side effect.
Weirdly enough, changing the contextId from 2 to 1 (1 being the global one) makes the snippet exit with 0, hence working as expected.
v12.1.0, although seems to apply to older versions toomacOSinspectororvmDemonstrating the issue from the title:
^ exits with code
1, even though the provided expressionais clearly causing no side effect.Weirdly enough, changing the
contextIdfrom2to1(1being the global one) makes the snippet exit with0, hence working as expected.