Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: runtime/observatory/lib/src/elements/debugger.dart

Issue 1344993002: Refactor isolate interrupts to use OOB messages instead of interrupt bits. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 (type 'continue' [F7] or 'step' [F10] to star t the isolate')");
zra 2015/09/16 20:19:16 Since you're in the neighborhood, you might fix th
turnidge 2015/09/22 17:37:38 Done.
1362 } else if (event.kind == ServiceEvent.kPauseExit) { 1362 } else if (event.kind == ServiceEvent.kPauseExit) {
1363 console.print( 1363 console.print(
1364 "Paused at isolate exit (type 'continue' or [F7] to exit the isolate') "); 1364 "Paused at isolate exit (type 'continue' or [F7] to exit the isolate') ");
1365 } 1365 }
1366 if (stack['frames'].length > 0) { 1366 if (stack['frames'].length > 0) {
1367 Frame frame = stack['frames'][0]; 1367 Frame frame = stack['frames'][0];
1368 var script = frame.location.script; 1368 var script = frame.location.script;
1369 script.load().then((_) { 1369 script.load().then((_) {
1370 var line = script.tokenToLine(frame.location.tokenPos); 1370 var line = script.tokenToLine(frame.location.tokenPos);
1371 var col = script.tokenToCol(frame.location.tokenPos); 1371 var col = script.tokenToCol(frame.location.tokenPos);
1372 if (event.breakpoint != null) { 1372 if (event.breakpoint != null) {
1373 var bpId = event.breakpoint.number; 1373 var bpId = event.breakpoint.number;
1374 console.print('Paused at breakpoint ${bpId} at ' 1374 console.print('Paused at breakpoint ${bpId} at '
1375 '${script.name}:${line}:${col}'); 1375 '${script.name}:${line}:${col}');
1376 } else if (event.exception != null) { 1376 } else if (event.exception != null) {
1377 console.print('Paused due to exception at ' 1377 console.print('Paused due to exception at '
1378 '${script.name}:${line}:${col}'); 1378 '${script.name}:${line}:${col}');
1379 // This seems to be missing if we are paused-at-exception after 1379 // 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 1380 // paused-at-isolate-exit. Maybe we shutdown part of the debugger too
1381 // soon? 1381 // soon?
1382 console.printRef(event.exception); 1382 console.printRef(event.exception);
1383 } else { 1383 } else {
1384 console.print('Paused at ${script.name}:${line}:${col}'); 1384 console.print('Paused at ${script.name}:${line}:${col}');
1385 } 1385 }
1386 }); 1386 });
1387 } else {
1388 console.print("Paused in message loop (type 'continue' or [F7] "
1389 "to resume processing messages)");
1387 } 1390 }
1388 } 1391 }
1389 1392
1390 Future _reportBreakpointEvent(ServiceEvent event) async { 1393 Future _reportBreakpointEvent(ServiceEvent event) async {
1391 var bpt = event.breakpoint; 1394 var bpt = event.breakpoint;
1392 var verb = null; 1395 var verb = null;
1393 switch (event.kind) { 1396 switch (event.kind) {
1394 case ServiceEvent.kBreakpointAdded: 1397 case ServiceEvent.kBreakpointAdded:
1395 verb = 'added'; 1398 verb = 'added';
1396 break; 1399 break;
(...skipping 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2356 } 2359 }
2357 }); 2360 });
2358 } 2361 }
2359 2362
2360 void focus() { 2363 void focus() {
2361 $['textBox'].focus(); 2364 $['textBox'].focus();
2362 } 2365 }
2363 2366
2364 DebuggerInputElement.created() : super.created(); 2367 DebuggerInputElement.created() : super.created();
2365 } 2368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698