| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // Simple interactive debugger shell that connects to the Dart VM's debugger | 5 // Simple interactive debugger shell that connects to the Dart VM's debugger |
| 6 // connection port. | 6 // connection port. |
| 7 | 7 |
| 8 #import("dart:io"); | 8 #import("dart:io"); |
| 9 #import("dart:json"); | 9 #import("dart:json"); |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 bt Show backtrace | 31 bt Show backtrace |
| 32 r Resume execution | 32 r Resume execution |
| 33 s Single step | 33 s Single step |
| 34 so Step over | 34 so Step over |
| 35 si Step into | 35 si Step into |
| 36 sbp [<file>] <line> Set breakpoint | 36 sbp [<file>] <line> Set breakpoint |
| 37 rbp <id> Remove breakpoint with given id | 37 rbp <id> Remove breakpoint with given id |
| 38 po <id> Print object info for given id | 38 po <id> Print object info for given id |
| 39 pc <id> Print class info for given id | 39 pc <id> Print class info for given id |
| 40 ll List loaded libraries | 40 ll List loaded libraries |
| 41 pl <id> Print library info for given id | 41 pl <id> Print library info for given library id |
| 42 pg <id> Print global variables visible given library | 42 pg <id> Print all global variables visible within given library id |
| 43 ls <libname> List loaded scripts in library | 43 ls <libname> List loaded scripts in library |
| 44 gs <lib_id> <script_url> Get source text of script in library | 44 gs <lib_id> <script_url> Get source text of script in library |
| 45 epi <none|all|unhandled> Set exception pause info | 45 epi <none|all|unhandled> Set exception pause info |
| 46 h Print help | 46 h Print help |
| 47 """); | 47 """); |
| 48 } | 48 } |
| 49 | 49 |
| 50 | 50 |
| 51 void quitShell() { | 51 void quitShell() { |
| 52 vmStream.close(); | 52 vmStream.close(); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 }; | 396 }; |
| 397 vmInStream.onError = (err) { | 397 vmInStream.onError = (err) { |
| 398 print("Error in debug connection: $err"); | 398 print("Error in debug connection: $err"); |
| 399 quitShell(); | 399 quitShell(); |
| 400 }; | 400 }; |
| 401 vmInStream.onClosed = () { | 401 vmInStream.onClosed = () { |
| 402 print("VM debugger connection closed"); | 402 print("VM debugger connection closed"); |
| 403 quitShell(); | 403 quitShell(); |
| 404 }; | 404 }; |
| 405 } | 405 } |
| OLD | NEW |