1
- ## Debugger
1
+ # Debugger
2
+
3
+ <!-- type=concept -->
2
4
3
5
V8 comes with an extensive debugger which is accessible out-of-process via a
4
6
simple [ 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
74
76
steps over to the next line. There are a few other commands available and more
75
77
to come. Type ` help ` to see others.
76
78
77
- ### Watchers
79
+ ## Watchers
78
80
79
81
You can watch expression and variable values while debugging your code.
80
82
On 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`
85
87
prints the active watchers. To remove a watcher, type
86
88
` unwatch("my_expression") ` .
87
89
88
- ### Commands reference
90
+ ## Commands reference
89
91
90
- #### Stepping
92
+ ### Stepping
91
93
92
94
* ` cont ` , ` c ` - Continue execution
93
95
* ` next ` , ` n ` - Step next
94
96
* ` step ` , ` s ` - Step in
95
97
* ` out ` , ` o ` - Step out
96
98
* ` pause ` - Pause running code (like pause button in Developer TOols)
97
99
98
- #### Breakpoints
100
+ ### Breakpoints
99
101
100
102
* ` setBreakpoint() ` , ` sb() ` - Set breakpoint on current line
101
103
* ` setBreakpoint(line) ` , ` sb(line) ` - Set breakpoint on specific line
@@ -105,7 +107,7 @@ functions body
105
107
script.js
106
108
* ` clearBreakpoint ` , ` cb(...) ` - Clear breakpoint
107
109
108
- #### Info
110
+ ### Info
109
111
110
112
* ` backtrace ` , ` bt ` - Print backtrace of current execution frame
111
113
* ` list(5) ` - List scripts source code with 5 line context (5 lines before and
@@ -116,21 +118,19 @@ after)
116
118
breakpoint)
117
119
* ` repl ` - Open debugger's repl for evaluation in debugging script's context
118
120
119
- #### Execution control
121
+ ### Execution control
120
122
121
123
* ` run ` - Run script (automatically runs on debugger's start)
122
124
* ` restart ` - Restart script
123
125
* ` kill ` - Kill script
124
126
125
- #### Various
127
+ ### Various
126
128
127
129
* ` scripts ` - List all loaded scripts
128
130
* ` version ` - Display v8's version
129
131
130
- ### Advanced Usage
132
+ ## Advanced Usage
131
133
132
134
The V8 debugger can be enabled and accessed either by starting Node with
133
135
the ` --debug ` command-line flag or by signaling an existing Node process
134
136
with ` SIGUSR1 ` .
135
-
136
-
0 commit comments