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

Side by Side Diff: runtime/observatory/lib/src/app/application.dart

Issue 866663003: Add a working command line debugger to Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 part of app; 5 part of app;
6 6
7 /// The observatory application. Instances of this are created and owned 7 /// The observatory application. Instances of this are created and owned
8 /// by the observatory_application custom element. 8 /// by the observatory_application custom element.
9 class ObservatoryApplication extends Observable { 9 class ObservatoryApplication extends Observable {
10 static ObservatoryApplication app; 10 static ObservatoryApplication app;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 notifications.removeWhere((oldEvent) { 59 notifications.removeWhere((oldEvent) {
60 return (oldEvent.isolate == isolate && 60 return (oldEvent.isolate == isolate &&
61 isPauseEvent(oldEvent)); 61 isPauseEvent(oldEvent));
62 }); 62 });
63 } 63 }
64 64
65 void _onEvent(ServiceEvent event) { 65 void _onEvent(ServiceEvent event) {
66 switch(event.eventType) { 66 switch(event.eventType) {
67 case 'IsolateCreated': 67 case 'IsolateCreated':
68 // vm.reload(); 68 // Ignore for now.
69 break;
70
71 case 'IsolateResumed':
72 event.isolate.pauseEvent = null;
69 break; 73 break;
70 74
71 case 'IsolateShutdown': 75 case 'IsolateShutdown':
72 // TODO(turnidge): Should we show the user isolate shutdown events? 76 // TODO(turnidge): Should we show the user isolate shutdown events?
73 // What if there are hundreds of them? Coalesce multiple 77 // What if there are hundreds of them? Coalesce multiple
74 // shutdown events into one notification? 78 // shutdown events into one notification?
75 removePauseEvents(event.isolate); 79 removePauseEvents(event.isolate);
76 // vm.reload(); 80
81 // TODO(turnidge): Reload the isolate for now in case it is
82 // paused. We may need to distinguish an IsolateShutdown
83 // event from a "paused at isolate shutdown" event.
84 event.isolate.reload();
77 break; 85 break;
78 86
79 case 'BreakpointResolved': 87 case 'BreakpointResolved':
80 event.isolate.reloadBreakpoints(); 88 event.isolate.reloadBreakpoints();
81 break; 89 break;
82 90
83 case 'BreakpointReached': 91 case 'BreakpointReached':
84 case 'IsolateInterrupted': 92 case 'IsolateInterrupted':
85 case 'ExceptionThrown': 93 case 'ExceptionThrown':
94 event.isolate.pauseEvent = event;
86 removePauseEvents(event.isolate); 95 removePauseEvents(event.isolate);
87 notifications.add(event); 96 notifications.add(event);
88 break; 97 break;
89 98
90 case '_Graph': 99 case '_Graph':
91 event.isolate.loadHeapSnapshot(event); 100 event.isolate.loadHeapSnapshot(event);
92 break; 101 break;
93 102
94 case 'GC': 103 case 'GC':
95 // Ignore GC events for now. 104 // Ignore GC events for now.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 230
222 _vmDisconnected(VM vm) { 231 _vmDisconnected(VM vm) {
223 if (this.vm != vm) { 232 if (this.vm != vm) {
224 // This disconnect event occured *after* a new VM was installed. 233 // This disconnect event occured *after* a new VM was installed.
225 return; 234 return;
226 } 235 }
227 this.vm = null; 236 this.vm = null;
228 notifications.add(new ServiceEvent.vmDisconencted()); 237 notifications.add(new ServiceEvent.vmDisconencted());
229 } 238 }
230 } 239 }
OLDNEW
« no previous file with comments | « no previous file | runtime/observatory/lib/src/elements/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698