1- ## Debugger
1+ # Debugger
2+
3+ <!-- type=concept -->
24
35V8 comes with an extensive debugger which is accessible out-of-process via a
46simple [ TCP protocol] ( http://code.google.com/p/v8/wiki/DebuggerProtocol ) .
@@ -74,7 +76,7 @@ The `repl` command allows you to evaluate code remotely. The `next` command
7476steps over to the next line. There are a few other commands available and more
7577to come. Type ` help ` to see others.
7678
77- ### Watchers
79+ ## Watchers
7880
7981You can watch expression and variable values while debugging your code.
8082On every breakpoint each expression from the watchers list will be evaluated
@@ -85,17 +87,17 @@ To start watching an expression, type `watch("my_expression")`. `watchers`
8587prints the active watchers. To remove a watcher, type
8688` unwatch("my_expression") ` .
8789
88- ### Commands reference
90+ ## Commands reference
8991
90- #### Stepping
92+ ### Stepping
9193
9294* ` cont ` , ` c ` - Continue execution
9395* ` next ` , ` n ` - Step next
9496* ` step ` , ` s ` - Step in
9597* ` out ` , ` o ` - Step out
9698* ` pause ` - Pause running code (like pause button in Developer TOols)
9799
98- #### Breakpoints
100+ ### Breakpoints
99101
100102* ` setBreakpoint() ` , ` sb() ` - Set breakpoint on current line
101103* ` setBreakpoint(line) ` , ` sb(line) ` - Set breakpoint on specific line
@@ -105,7 +107,7 @@ functions body
105107script.js
106108* ` clearBreakpoint ` , ` cb(...) ` - Clear breakpoint
107109
108- #### Info
110+ ### Info
109111
110112* ` backtrace ` , ` bt ` - Print backtrace of current execution frame
111113* ` list(5) ` - List scripts source code with 5 line context (5 lines before and
@@ -116,21 +118,19 @@ after)
116118breakpoint)
117119* ` repl ` - Open debugger's repl for evaluation in debugging script's context
118120
119- #### Execution control
121+ ### Execution control
120122
121123* ` run ` - Run script (automatically runs on debugger's start)
122124* ` restart ` - Restart script
123125* ` kill ` - Kill script
124126
125- #### Various
127+ ### Various
126128
127129* ` scripts ` - List all loaded scripts
128130* ` version ` - Display v8's version
129131
130- ### Advanced Usage
132+ ## Advanced Usage
131133
132134The V8 debugger can be enabled and accessed either by starting Node with
133135the ` --debug ` command-line flag or by signaling an existing Node process
134136with ` SIGUSR1 ` .
135-
136-
0 commit comments