Experience-Monks / devtool

[OBSOLETE] runs Node.js programs through Chromium DevTools
MIT License
3.76k stars 148 forks source link

Breakpoints in VM scripts #95

Open aleclarson opened 7 years ago

aleclarson commented 7 years ago

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
  })
)