JS ⟩ statement ⟩ other ⟩ debugger
JS ⟩ debug ⟩ devtools ⟩ debugger
(statement)
normally does nothing.
if a debugger program is available and running (👉 see ⭐️ 重點), then it may perform some kind of debugging action.
in practice, this statement acts like a breakpoint.
debugger // acts like a breakpoint
it is not enough to have a debugger available.
the debugger statement won’t start the debugger for you.
if you’re using a web browser and have the devtools open, this statement will cause a breakpoint.
JavaScript: The Definitive Guide ⟩ 5.6.2 debugger
debuggerarrow-up-right
Last updated 3 years ago