This repository was archived by the owner on Feb 1, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 45
This repository was archived by the owner on Feb 1, 2022. It is now read-only.
Make it work like the real thing #1
Copy link
Copy link
Closed
Description
As per the official docs:
-
node debug <script>starts the script and attaches a debugger -
node debug <host>:<port>attaches to a running debugger remotely -
helpshows available commands - Enter repeats the last command
Stepping
-
cont,c: Resumes execution -
next,n: Step over current line -
step,s: Step into current line, potentially entering the function being called -
out,o: Drop out of current function -
pause: Pause execution
Breakpoints
-
setBreakpoint(),sb(): Set breakpoint on current line -
setBreakpoint(line),sb(line): Set breakpoint on specific line -
setBreakpoint('fn()'),sb(...): Set breakpoint on a first statement in functions body -
setBreakpoint('script.js', 1),sb(...): Set breakpoint on first line of script.js -
breakpoints: List all breakpoints -
clearBreakpoint('script.js', 1),cb(...): Clear breakpoint in script.js on line 1 - It is also possible to set a breakpoint in a file (module) that isn't loaded yet
Information
-
backtrace,bt: Print backtrace of current execution frame -
list(n): List scripts source code withnline context (nlines before and after) -
watch(expr): Add expression to watch list -
unwatch(expr): Remove expression from watch list -
watchers: List all watchers and their values (automatically listed on each breakpoint) -
repl: Open debugger's repl for evaluation in debugging script's context -
exec expr/exec('expr'): Execute an expression in debugging script's context
Execution control
-
run: Run script (automatically runs on debugger's start) -
restart: Restart script -
kill: Kill script
Various
-
scripts: List all loaded scripts -
version: Display V8's version
Metadata
Metadata
Assignees
Labels
No labels