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

Make it work like the real thing #1

Closed
@jkrems

Description

@jkrems

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions