Javascript debuggers: Difference between revisions
From wikinotes
Line 20: | Line 20: | ||
console.trace(); | console.trace(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
there are no console commands to jump for next/step/continue like gdb.<br> | |||
instead you have to use the UI, or use OS-specific hotkeys: | |||
<source lang="yaml"> | |||
super ' # next | |||
super ; # step | |||
super \ # continue | |||
</source> | |||
</blockquote><!-- Example --> | </blockquote><!-- Example --> |
Latest revision as of 20:42, 22 February 2024
A debugger is builtin to your browser console.
Documentation
MDN: debugger https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/debugger
Example
// add to your code, this is your breakpoint // (you may need the dev tools/console visible for it to trigger) debugger; // show stacktrace console.trace();there are no console commands to jump for next/step/continue like gdb.
instead you have to use the UI, or use OS-specific hotkeys:super ' # next super ; # step super \ # continue