Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Make it work like the real thing #1

Closed
27 of 28 tasks
jkrems opened this issue Sep 8, 2016 · 0 comments
Closed
27 of 28 tasks

Make it work like the real thing #1

jkrems opened this issue Sep 8, 2016 · 0 comments

Comments

@jkrems
Copy link
Collaborator

jkrems commented Sep 8, 2016

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
  • help shows 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 with n line context (n lines 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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant