OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Library used by debugger wire protocol tests (standalone VM debugging). | 5 // Library used by debugger wire protocol tests (standalone VM debugging). |
6 | 6 |
7 library DartDebugger; | 7 library DartDebugger; |
8 | 8 |
9 import "dart:async"; | 9 import "dart:async"; |
10 import "dart:io"; | 10 import "dart:io"; |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 } | 234 } |
235 | 235 |
236 | 236 |
237 class RunCommand extends Command { | 237 class RunCommand extends Command { |
238 RunCommand.resume() { | 238 RunCommand.resume() { |
239 template = {"id": 0, "command": "resume", "params": {"isolateId": 0}}; | 239 template = {"id": 0, "command": "resume", "params": {"isolateId": 0}}; |
240 } | 240 } |
241 RunCommand.step() { | 241 RunCommand.step() { |
242 template = {"id": 0, "command": "stepOver", "params": {"isolateId": 0}}; | 242 template = {"id": 0, "command": "stepOver", "params": {"isolateId": 0}}; |
243 } | 243 } |
| 244 RunCommand.stepInto() { |
| 245 template = {"id": 0, "command": "stepInto", "params": {"isolateId": 0}}; |
| 246 } |
| 247 RunCommand.stepOut() { |
| 248 template = {"id": 0, "command": "stepOut", "params": {"isolateId": 0}}; |
| 249 } |
244 void send(Debugger debugger) { | 250 void send(Debugger debugger) { |
245 debugger.sendMessage(template); | 251 debugger.sendMessage(template); |
246 debugger.isPaused = false; | 252 debugger.isPaused = false; |
247 } | 253 } |
248 } | 254 } |
249 | 255 |
250 | 256 |
251 Resume() => new RunCommand.resume(); | 257 Resume() => new RunCommand.resume(); |
252 Step() => new RunCommand.step(); | 258 Step() => new RunCommand.step(); |
253 | 259 StepInto() => new RunCommand.stepInto(); |
| 260 StepOut() => new RunCommand.stepOut(); |
254 | 261 |
255 class SetBreakpointCommand extends Command { | 262 class SetBreakpointCommand extends Command { |
256 int line; | 263 int line; |
257 SetBreakpointCommand(int this.line) { | 264 SetBreakpointCommand(int this.line) { |
258 template = {"id": 0, | 265 template = {"id": 0, |
259 "command": "setBreakpoint", | 266 "command": "setBreakpoint", |
260 "params": { "isolateId": 0, | 267 "params": { "isolateId": 0, |
261 "url": null, | 268 "url": null, |
262 "line": null }}; | 269 "line": null }}; |
263 } | 270 } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 var trace = getAttachedStackTrace(e); | 541 var trace = getAttachedStackTrace(e); |
535 if (trace != null) print("StackTrace: $trace"); | 542 if (trace != null) print("StackTrace: $trace"); |
536 return -1; | 543 return -1; |
537 } else { | 544 } else { |
538 // Retry with another random port. | 545 // Retry with another random port. |
539 RunScript(script); | 546 RunScript(script); |
540 } | 547 } |
541 }); | 548 }); |
542 return true; | 549 return true; |
543 } | 550 } |
OLD | NEW |