devtool icon indicating copy to clipboard operation
devtool copied to clipboard

Breakpoints in VM scripts

Open aleclarson opened this issue 9 years ago • 0 comments

I've noticed VM scripts do not have their breakpoints triggered. Do you have any insight on this?

Probably due to the debugger protocol not being supported in VM, right?

For example, try pasting this in the console:

vm = require('vm')
vm.runInContext(
  'console.log("before debugger");\n' +
  'debugger;\n' +
  'console.log("after debugger");\n' +
  '//# sourceURL=wat.js',
  vm.createContext({
    console: console
  })
)

aleclarson avatar Oct 03 '16 07:10 aleclarson