| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 debugger_page_element; | 5 library debugger_page_element; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'observatory_element.dart'; | 9 import 'observatory_element.dart'; |
| 10 import 'package:observatory/cli.dart'; | 10 import 'package:observatory/cli.dart'; |
| (...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 String helpShort = | 342 String helpShort = |
| 343 'Continue running the isolate until it reaches the next source location'; | 343 'Continue running the isolate until it reaches the next source location'; |
| 344 | 344 |
| 345 String helpLong = | 345 String helpLong = |
| 346 'Continue running the isolate until it reaches the next source ' | 346 'Continue running the isolate until it reaches the next source ' |
| 347 'location.\n' | 347 'location.\n' |
| 348 '\n' | 348 '\n' |
| 349 'Syntax: step\n'; | 349 'Syntax: step\n'; |
| 350 } | 350 } |
| 351 | 351 |
| 352 class AsyncStepCommand extends DebuggerCommand { | 352 class AsyncNextCommand extends DebuggerCommand { |
| 353 AsyncStepCommand(Debugger debugger) : super(debugger, 'astep', []) { | 353 AsyncNextCommand(Debugger debugger) : super(debugger, 'anext', []) { |
| 354 } | 354 } |
| 355 | 355 |
| 356 Future run(List<String> args) async { | 356 Future run(List<String> args) async { |
| 357 if (debugger.isolatePaused()) { | 357 if (debugger.isolatePaused()) { |
| 358 var event = debugger.isolate.pauseEvent; | 358 var event = debugger.isolate.pauseEvent; |
| 359 if (event.asyncContinuation == null) { | 359 if (event.asyncContinuation == null) { |
| 360 debugger.console.print("No async continuation at this location"); | 360 debugger.console.print("No async continuation at this location"); |
| 361 return; | 361 return; |
| 362 } | 362 } |
| 363 var bpt = await | 363 var bpt = await |
| 364 debugger.isolate.addBreakOnActivation(event.asyncContinuation); | 364 debugger.isolate.addBreakOnActivation(event.asyncContinuation); |
| 365 return debugger.isolate.resume(); | 365 return debugger.isolate.resume(); |
| 366 } else { | 366 } else { |
| 367 debugger.console.print('The program is already running'); | 367 debugger.console.print('The program is already running'); |
| 368 } | 368 } |
| 369 } | 369 } |
| 370 | 370 |
| 371 String helpShort = | 371 String helpShort = |
| 372 'Step into asynchronous continuation'; | 372 'Step over await or yield'; |
| 373 | 373 |
| 374 String helpLong = | 374 String helpLong = |
| 375 'Continue running the isolate until control returns to the current ' | 375 'Continue running the isolate until control returns to the current ' |
| 376 'activation of an async or async* function.\n' | 376 'activation of an async or async* function.\n' |
| 377 '\n' | 377 '\n' |
| 378 'Syntax: astep\n'; | 378 'Syntax: anext\n'; |
| 379 } | 379 } |
| 380 | 380 |
| 381 class FinishCommand extends DebuggerCommand { | 381 class FinishCommand extends DebuggerCommand { |
| 382 FinishCommand(Debugger debugger) : super(debugger, 'finish', []); | 382 FinishCommand(Debugger debugger) : super(debugger, 'finish', []); |
| 383 | 383 |
| 384 Future run(List<String> args) { | 384 Future run(List<String> args) { |
| 385 if (debugger.isolatePaused()) { | 385 if (debugger.isolatePaused()) { |
| 386 return debugger.isolate.stepOut(); | 386 return debugger.isolate.stepOut(); |
| 387 } else { | 387 } else { |
| 388 debugger.console.print('The program is already running'); | 388 debugger.console.print('The program is already running'); |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 972 cmd = new RootCommand([ | 972 cmd = new RootCommand([ |
| 973 new HelpCommand(this), | 973 new HelpCommand(this), |
| 974 new PrintCommand(this), | 974 new PrintCommand(this), |
| 975 new DownCommand(this), | 975 new DownCommand(this), |
| 976 new UpCommand(this), | 976 new UpCommand(this), |
| 977 new FrameCommand(this), | 977 new FrameCommand(this), |
| 978 new PauseCommand(this), | 978 new PauseCommand(this), |
| 979 new ContinueCommand(this), | 979 new ContinueCommand(this), |
| 980 new NextCommand(this), | 980 new NextCommand(this), |
| 981 new StepCommand(this), | 981 new StepCommand(this), |
| 982 new AsyncStepCommand(this), | 982 new AsyncNextCommand(this), |
| 983 new FinishCommand(this), | 983 new FinishCommand(this), |
| 984 new BreakCommand(this), | 984 new BreakCommand(this), |
| 985 new SetCommand(this), | 985 new SetCommand(this), |
| 986 new ClearCommand(this), | 986 new ClearCommand(this), |
| 987 new DeleteCommand(this), | 987 new DeleteCommand(this), |
| 988 new InfoCommand(this), | 988 new InfoCommand(this), |
| 989 new IsolateCommand(this), | 989 new IsolateCommand(this), |
| 990 new RefreshCommand(this), | 990 new RefreshCommand(this), |
| 991 ]); | 991 ]); |
| 992 _stdioPrinter = new _VMStreamPrinter(this); | 992 _stdioPrinter = new _VMStreamPrinter(this); |
| (...skipping 891 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1884 }); | 1884 }); |
| 1885 } | 1885 } |
| 1886 | 1886 |
| 1887 void focus() { | 1887 void focus() { |
| 1888 $['textBox'].focus(); | 1888 $['textBox'].focus(); |
| 1889 } | 1889 } |
| 1890 | 1890 |
| 1891 DebuggerInputElement.created() : super.created(); | 1891 DebuggerInputElement.created() : super.created(); |
| 1892 } | 1892 } |
| 1893 | 1893 |
| OLD | NEW |