Tag: 条件断点

在NodeJSdebugging器中添加条件断点

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 (foo()) { debugger; } 这是可能的通过NodeJSdebugging器?