Reputation: 382532
main.js
#!/usr/bin/env node
function myfunc(i) {
return i + 1;
}
let i = 1;
i += 1;
console.log(myfunc(i));
Start debugging:
node inspect main.js
Leaves me at:
Break on start in main.js:7
5 }
6
> 7 let i = 1;
8 i += 1;
9 console.log(myfunc(i));
Now I want to go directly to myfunc
without:
n
, n
, s
debugger
statement into myfunc
I tried something like:
sb myfunc
to add a breakpoint on myfunc
, but sb
only seems to be able to set breakpoints at the current line:
sb myfunc
^^^^^^
Uncaught SyntaxError: Unexpected identifier
Tested on node v12.18.1.
Upvotes: 0
Views: 370