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/app.dart'; | 10 import 'package:observatory/app.dart'; |
(...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1351 _reportPause(_isolate.pauseEvent); | 1351 _reportPause(_isolate.pauseEvent); |
1352 } else { | 1352 } else { |
1353 console.print('Isolate is in unknown state'); | 1353 console.print('Isolate is in unknown state'); |
1354 } | 1354 } |
1355 warnOutOfDate(); | 1355 warnOutOfDate(); |
1356 } | 1356 } |
1357 | 1357 |
1358 void _reportPause(ServiceEvent event) { | 1358 void _reportPause(ServiceEvent event) { |
1359 if (event.kind == ServiceEvent.kPauseStart) { | 1359 if (event.kind == ServiceEvent.kPauseStart) { |
1360 console.print( | 1360 console.print( |
1361 "Paused at isolate start (type 'continue' [F7] or 'step' [F10] to star
t the isolate')"); | 1361 "Paused at isolate start " |
| 1362 "(type 'continue' [F7] or 'step' [F10] to start the isolate')"); |
1362 } else if (event.kind == ServiceEvent.kPauseExit) { | 1363 } else if (event.kind == ServiceEvent.kPauseExit) { |
1363 console.print( | 1364 console.print( |
1364 "Paused at isolate exit (type 'continue' or [F7] to exit the isolate')
"); | 1365 "Paused at isolate exit " |
| 1366 "(type 'continue' or [F7] to exit the isolate')"); |
1365 } | 1367 } |
1366 if (stack['frames'].length > 0) { | 1368 if (stack['frames'].length > 0) { |
1367 Frame frame = stack['frames'][0]; | 1369 Frame frame = stack['frames'][0]; |
1368 var script = frame.location.script; | 1370 var script = frame.location.script; |
1369 script.load().then((_) { | 1371 script.load().then((_) { |
1370 var line = script.tokenToLine(frame.location.tokenPos); | 1372 var line = script.tokenToLine(frame.location.tokenPos); |
1371 var col = script.tokenToCol(frame.location.tokenPos); | 1373 var col = script.tokenToCol(frame.location.tokenPos); |
1372 if (event.breakpoint != null) { | 1374 if (event.breakpoint != null) { |
1373 var bpId = event.breakpoint.number; | 1375 var bpId = event.breakpoint.number; |
1374 console.print('Paused at breakpoint ${bpId} at ' | 1376 console.print('Paused at breakpoint ${bpId} at ' |
1375 '${script.name}:${line}:${col}'); | 1377 '${script.name}:${line}:${col}'); |
1376 } else if (event.exception != null) { | 1378 } else if (event.exception != null) { |
1377 console.print('Paused due to exception at ' | 1379 console.print('Paused due to exception at ' |
1378 '${script.name}:${line}:${col}'); | 1380 '${script.name}:${line}:${col}'); |
1379 // This seems to be missing if we are paused-at-exception after | 1381 // This seems to be missing if we are paused-at-exception after |
1380 // paused-at-isolate-exit. Maybe we shutdown part of the debugger too | 1382 // paused-at-isolate-exit. Maybe we shutdown part of the debugger too |
1381 // soon? | 1383 // soon? |
1382 console.printRef(event.exception); | 1384 console.printRef(event.exception); |
1383 } else { | 1385 } else { |
1384 console.print('Paused at ${script.name}:${line}:${col}'); | 1386 console.print('Paused at ${script.name}:${line}:${col}'); |
1385 } | 1387 } |
1386 }); | 1388 }); |
| 1389 } else { |
| 1390 console.print("Paused in message loop (type 'continue' or [F7] " |
| 1391 "to resume processing messages)"); |
1387 } | 1392 } |
1388 } | 1393 } |
1389 | 1394 |
1390 Future _reportBreakpointEvent(ServiceEvent event) async { | 1395 Future _reportBreakpointEvent(ServiceEvent event) async { |
1391 var bpt = event.breakpoint; | 1396 var bpt = event.breakpoint; |
1392 var verb = null; | 1397 var verb = null; |
1393 switch (event.kind) { | 1398 switch (event.kind) { |
1394 case ServiceEvent.kBreakpointAdded: | 1399 case ServiceEvent.kBreakpointAdded: |
1395 verb = 'added'; | 1400 verb = 'added'; |
1396 break; | 1401 break; |
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 } | 2361 } |
2357 }); | 2362 }); |
2358 } | 2363 } |
2359 | 2364 |
2360 void focus() { | 2365 void focus() { |
2361 $['textBox'].focus(); | 2366 $['textBox'].focus(); |
2362 } | 2367 } |
2363 | 2368 |
2364 DebuggerInputElement.created() : super.created(); | 2369 DebuggerInputElement.created() : super.created(); |
2365 } | 2370 } |
OLD | NEW |