Closed AngDH closed 5 months ago
It looks like inspector sessions haven't worked for a while. This was fixed in b1d9a29cf7913d1c1efdd3b29337b35954d8d022. You'll have to get that from 5.0.1 when I release it.
I also provided an example of how you can simulate something like node's --inspect-brk option: https://github.com/laverdet/isolated-vm/blob/b1d9a29cf7913d1c1efdd3b29337b35954d8d022/inspector-example.js#L14-L17
That's awesome ! Debugging is so convenient just like "node's --inspect-brk option "
In the demo at https://github.com/laverdet/isolated-vm/blob/main/inspector-example.js, the JavaScript code used is as follows:
let script = await isolate.compileScript('for(;;)debugger;', { filename: 'example.js' });
// for(;;)debugger; // use for loop stop script Implement the stopOnEntry effect
Now, I want to debug my JavaScript code ,Here is what I am currently doing: //first line code let flag = 0; while (flag === 0) { debugger; }; // after code //..... Are there any good solutions to improve this? I want the debugger to break at the first line of code automatically.