node.js help
命令输出以下内容:
debug> help Commands: run (r), cont (c), next (n), step (s), out (o), backtrace (bt), setBreakpoint (sb), clearBreakpoint (cb), watch, unwatch, watchers, repl, restart, kill, list, scripts, breakOnException, breakpoints, version
我可以使用setBreakpoint
以下命令添加新的断点:
debug> setBreakpoint(12) ...
但我可以让它有条件吗?例如:
*only if `foo() === true`, stop here*
另一种方法是if
在脚本中添加它:
if (foo()) { debugger; }
这是通过NodeJS调试器实现的吗?