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

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

Issue 1120133002: Rework error handling in the service protocol and in Observatory. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix tests Created 5 years, 7 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
OLDNEW
1 <link rel="import" href="../../../../packages/polymer/polymer.html"> 1 <link rel="import" href="../../../../packages/polymer/polymer.html">
2 <link rel="import" href="function_ref.html"> 2 <link rel="import" href="function_ref.html">
3 <link rel="import" href="nav_bar.html"> 3 <link rel="import" href="nav_bar.html">
4 <link rel="import" href="eval_link.html"> 4 <link rel="import" href="eval_link.html">
5 <link rel="import" href="observatory_element.html"> 5 <link rel="import" href="observatory_element.html">
6 <link rel="import" href="script_inset.html"> 6 <link rel="import" href="script_inset.html">
7 <link rel="import" href="script_ref.html"> 7 <link rel="import" href="script_ref.html">
8 8
9 <!-- TODO(turnidge): Use core-icon once core_elements work properly in 9 <!-- TODO(turnidge): Use core-icon once core_elements work properly in
10 devtools --> 10 devtools -->
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 .console { 101 .console {
102 flex: 1 1 auto; 102 flex: 1 1 auto;
103 overflow-y: auto; 103 overflow-y: auto;
104 } 104 }
105 .commandline { 105 .commandline {
106 flex: 0 0 auto; 106 flex: 0 0 auto;
107 } 107 }
108 </style> 108 </style>
109 109
110 <div class="container"> 110 <div class="container">
111 <nav-bar id="navbarDiv" showNotify="{{ false }}"> 111 <nav-bar id="navbarDiv" notifyOnPause="{{ false }}">
112 <top-nav-menu></top-nav-menu> 112 <top-nav-menu></top-nav-menu>
113 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu> 113 <vm-nav-menu vm="{{ isolate.vm }}"></vm-nav-menu>
114 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu> 114 <isolate-nav-menu isolate="{{ isolate }}"></isolate-nav-menu>
115 <nav-menu link="{{ makeLink('/debugger', isolate) }}" anchor="debugger" last="{{ true }}"></nav-menu> 115 <nav-menu link="{{ makeLink('/debugger', isolate) }}" anchor="debugger" last="{{ true }}"></nav-menu>
116 </nav-bar> 116 </nav-bar>
117 <div id="stackDiv" class="stack"> 117 <div id="stackDiv" class="stack">
118 <debugger-stack id="stackElement" isolate="{{ isolate }}"></debugger-sta ck> 118 <debugger-stack id="stackElement" isolate="{{ isolate }}"></debugger-sta ck>
119 </div> 119 </div>
120 <!-- 120 <!--
121 <core-splitter direction="up" allowOverflow=true></core-splitter> 121 <core-splitter direction="up" allowOverflow=true></core-splitter>
(...skipping 17 matching lines...) Expand all
139 margin: 0px 20px 10px 20px; 139 margin: 0px 20px 10px 20px;
140 font: 400 14px 'Montserrat', sans-serif; 140 font: 400 14px 'Montserrat', sans-serif;
141 line-height: 125%; 141 line-height: 125%;
142 } 142 }
143 .splitter { 143 .splitter {
144 height: 0px; 144 height: 0px;
145 margin: 0px; 145 margin: 0px;
146 font-size: 1px; 146 font-size: 1px;
147 border-bottom: 1px dashed #888; 147 border-bottom: 1px dashed #888;
148 } 148 }
149 .noMessages .noStack { 149 .noMessages, .noStack {
150 margin: 0px 20px 10px 20px; 150 margin: 10px 0px 10px 25px;
151 font: normal 14px consolas, courier, monospace; 151 font: bold 14px 'Montserrat', sans-serif;
152 line-height: 125%; 152 line-height: 125%;
153 } 153 }
154 </style> 154 </style>
155 <template if="{{ isSampled }}"> 155 <template if="{{ isSampled }}">
156 <div class="sampledMessage"> 156 <div class="sampledMessage">
157 The program is not paused. The stack trace below may be out of date.<br > 157 The program is not paused. The stack trace below may be out of date.<br >
158 <br> 158 <br>
159 <action-link label="Pause Isolate" callback="{{ doPauseIsolate }}"> 159 <action-link label="Pause Isolate" callback="{{ doPauseIsolate }}">
160 </action-link> 160 </action-link>
161 <action-link label="Refresh Stack" callback="{{ doRefreshStack }}"> 161 <action-link label="Refresh Stack" callback="{{ doRefreshStack }}">
162 </action-link> 162 </action-link>
163 <br> 163 <br>
164 <br> 164 <br>
165 <hr class="splitter"> 165 <hr class="splitter">
166 </div> 166 </div>
167 </template> 167 </template>
168 <template if="{{ !hasStack }}"> 168 <template if="{{ !hasStack }}">
169 <div class="noStack">No stack</div> 169 <div class="noStack">No stack</div>
170 </template> 170 </template>
171 <ul id="frameList" class="list-group"> 171 <ul id="frameList" class="list-group">
172 <!-- debugger-frame elements are added programmatically --> 172 <!-- debugger-frame elements are added programmatically -->
173 </ul> 173 </ul>
174 <hr> 174 <hr>
175 <template if="{{ !hasMessages }}"> 175 <template if="{{ !hasMessages }}">
176 <div class="noMessages">No messages</div> 176 <div class="noMessages">No pending messages</div>
177 </template> 177 </template>
178 <ul id="messageList" class="list-group"> 178 <ul id="messageList" class="list-group">
179 <!-- debugger-message elements are added programmatically --> 179 <!-- debugger-message elements are added programmatically -->
180 </ul> 180 </ul>
181 </template> 181 </template>
182 </polymer-element> 182 </polymer-element>
183 183
184 184
185 <polymer-element name="debugger-frame" extends="observatory-element"> 185 <polymer-element name="debugger-frame" extends="observatory-element">
186 <template> 186 <template>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 .frameOuter:hover .frameExpander{ 220 .frameOuter:hover .frameExpander{
221 display: inline-block; 221 display: inline-block;
222 } 222 }
223 .frameContractor { 223 .frameContractor {
224 position: absolute; 224 position: absolute;
225 right: 5px; 225 right: 5px;
226 bottom: 5px; 226 bottom: 5px;
227 display: inline-block; 227 display: inline-block;
228 } 228 }
229 .flex-item-script {
230 flex-grow: 1;
231 flex-shrink: 1;
232 flex-basis: 765px;
233 }
234 .flex-item-vars {
235 flex-grow: 5;
236 flex-shrink: 0;
237 flex-basis: 225px;
238 }
229 </style> 239 </style>
230 <div id="frameOuter" class="frameOuter"> 240 <div id="frameOuter" class="frameOuter">
231 <a on-click="{{ toggleExpand }}"> 241 <a on-click="{{ toggleExpand }}">
232 <div class="frameSummary"> 242 <div class="frameSummary">
233 <div class="frameSummaryText"> 243 <div class="frameSummaryText">
234 <div class="frameId"><b>frame {{ frame['depth'] }}</b></div> 244 <div class="frameId"><b>frame {{ frame['depth'] }}</b></div>
235 <function-ref ref="{{ frame['function'] }}"></function-ref> 245 <function-ref ref="{{ frame['function'] }}"></function-ref>
236 ( <script-ref ref="{{ frame['script'] }}" 246 ( <script-ref ref="{{ frame['script'] }}"
237 pos="{{ frame['tokenPos'] }}"> 247 pos="{{ frame['tokenPos'] }}">
238 </script-ref> ) 248 </script-ref> )
239 </div> 249 </div>
240 <template if="{{ !expanded }}"> 250 <template if="{{ !expanded }}">
241 <div class="frameExpander"> 251 <div class="frameExpander">
242 <icon-expand-more></icon-expand-more> 252 <icon-expand-more></icon-expand-more>
243 </div> 253 </div>
244 </template> 254 </template>
245 </div> 255 </div>
246 </a> 256 </a>
247 257
248 <template if="{{expanded}}"> 258 <template if="{{expanded}}">
249 <div class="frameDetails"> 259 <div class="frameDetails">
250 <div class="flex-row"> 260 <div class="flex-row-wrap">
251 <div class="flex-item-60-percent"> 261 <div class="flex-item-script">
252 <script-inset height="{{ scriptHeight }}" 262 <script-inset height="{{ scriptHeight }}"
253 script="{{ frame['function'].script }}" 263 script="{{ frame['function'].script }}"
254 startPos="{{ frame['function'].tokenPos }}" 264 startPos="{{ frame['function'].tokenPos }}"
255 endPos="{{ frame['function'].endTokenPos }}" 265 endPos="{{ frame['function'].endTokenPos }}"
256 currentPos="{{ frame['tokenPos'] }}" 266 currentPos="{{ frame['tokenPos'] }}"
257 inDebuggerContext="{{ true }}" 267 inDebuggerContext="{{ true }}"
258 variables="{{ frame['vars'] }}"> 268 variables="{{ frame['vars'] }}">
259 </script-inset> 269 </script-inset>
260 </div> 270 </div>
261 <div class="flex-item-40-percent"> 271 <div class="flex-item-vars">
262 <div style="padding:10px;" class="memberList"> 272 <div style="padding:10px;" class="memberList">
263 <template repeat="{{ v in frame['vars'] }}"> 273 <template repeat="{{ v in frame['vars'] }}">
264 <div class="memberItem"> 274 <div class="memberItem">
265 <div class="memberName">{{ v['name']}}</div> 275 <div class="memberName">{{ v['name']}}</div>
266 <div class="memberValue"> 276 <div class="memberValue">
267 <any-service-ref ref="{{ v['value'] }}"> 277 <any-service-ref ref="{{ v['value'] }}">
268 </any-service-ref> 278 </any-service-ref>
269 </div> 279 </div>
270 </div> 280 </div>
271 </template> 281 </template>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 } 333 }
324 .messageOuter:hover .messageExpander { 334 .messageOuter:hover .messageExpander {
325 display: inline-block; 335 display: inline-block;
326 } 336 }
327 .messageContractor { 337 .messageContractor {
328 position: absolute; 338 position: absolute;
329 right: 5px; 339 right: 5px;
330 bottom: 5px; 340 bottom: 5px;
331 display: inline-block; 341 display: inline-block;
332 } 342 }
343 .flex-item-script {
344 flex-grow: 1;
345 flex-shrink: 1;
346 flex-basis: 765px;
347 }
348 .flex-item-vars {
349 flex-grow: 5;
350 flex-shrink: 0;
351 flex-basis: 225px;
352 }
333 </style> 353 </style>
334 <div id="messageOuter" class="messageOuter"> 354 <div id="messageOuter" class="messageOuter">
335 <a on-click="{{ toggleExpand }}"> 355 <a on-click="{{ toggleExpand }}">
336 <div class="messageSummary"> 356 <div class="messageSummary">
337 <div class="messageSummaryText"> 357 <div class="messageSummaryText">
338 <div class="messageId"><b>message {{ message['depth'] }}</b></div> 358 <div class="messageId"><b>message {{ message['depth'] }}</b></div>
339 <function-ref ref="{{ message['handlerFunction'] }}"></function-ref> 359 <function-ref ref="{{ message['handlerFunction'] }}"></function-ref>
340 ( <script-ref ref="{{ message['handlerScript'] }}" 360 ( <script-ref ref="{{ message['handlerScript'] }}"
341 pos="{{ message['handlerTokenPos'] }}"> 361 pos="{{ message['handlerTokenPos'] }}">
342 </script-ref> ) 362 </script-ref> )
343 </div> 363 </div>
344 <template if="{{ !expanded }}"> 364 <template if="{{ !expanded }}">
345 <div class="messageExpander"> 365 <div class="messageExpander">
346 <icon-expand-more></icon-expand-more> 366 <icon-expand-more></icon-expand-more>
347 </div> 367 </div>
348 </template> 368 </template>
349 </div> 369 </div>
350 </a> 370 </a>
351 371
352 <template if="{{expanded}}"> 372 <template if="{{expanded}}">
353 <div class="messageDetails"> 373 <div class="messageDetails">
354 <div class="flex-row"> 374 <div class="flex-row-wrap">
355 <div class="flex-item-60-percent"> 375 <div class="flex-item-script">
356 <template if="{{ message['handlerFunction'] != null }}"> 376 <template if="{{ message['handlerFunction'] != null }}">
357 <script-inset height="{{ scriptHeight }}" 377 <script-inset height="{{ scriptHeight }}"
358 script="{{ message['handlerFunction'].script }}" 378 script="{{ message['handlerFunction'].script }}"
359 startPos="{{ message['handlerFunction'].tokenPos }}" 379 startPos="{{ message['handlerFunction'].tokenPos }}"
360 endPos="{{ message['handlerFunction'].endTokenPos }} " 380 endPos="{{ message['handlerFunction'].endTokenPos }} "
361 inDebuggerContext="{{ true }}"> 381 inDebuggerContext="{{ true }}">
362 </script-inset> 382 </script-inset>
363 </template> 383 </template>
364 </div> 384 </div>
365 <div class="flex-item-40-percent"> 385 <div class="flex-item-vars">
366 <div class="memberItem"> 386 <div class="memberItem">
367 <div class="memberName"></div> 387 <div class="memberName"></div>
368 <div class="memberValue"> 388 <div class="memberValue">
369 <eval-link callback="{{ previewMessage }}" label="[preview]" r esult="{{ preview }}"></eval-link> 389 <eval-link callback="{{ previewMessage }}" label="[preview]" r esult="{{ preview }}"></eval-link>
370 </div> 390 </div>
371 </div> 391 </div>
372 </div> 392 </div>
373 </div> 393 </div>
374 <div class="messageContractor"> 394 <div class="messageContractor">
375 <template if="{{expanded}}"> 395 <template if="{{expanded}}">
(...skipping 18 matching lines...) Expand all
394 .normal { 414 .normal {
395 font: normal 14px consolas, courier, monospace; 415 font: normal 14px consolas, courier, monospace;
396 white-space: pre; 416 white-space: pre;
397 line-height: 125%; 417 line-height: 125%;
398 } 418 }
399 .bold { 419 .bold {
400 font: bold 14px consolas, courier, monospace; 420 font: bold 14px consolas, courier, monospace;
401 white-space: pre; 421 white-space: pre;
402 line-height: 125%; 422 line-height: 125%;
403 } 423 }
424 .red {
425 font: normal 14px consolas, courier, monospace;
426 white-space: pre;
427 line-height: 125%;
428 color: red;
429 }
404 .spacer { 430 .spacer {
405 height: 20px; 431 height: 20px;
406 } 432 }
407 </style> 433 </style>
408 <div id="consoleText" class="console"> 434 <div id="consoleText" class="console">
409 <!-- Console output is added programmatically here using the 'normal' 435 <!-- Console output is added programmatically here using the 'normal'
410 and 'bold' styles. --> 436 and 'bold' styles. -->
411 </div> 437 </div>
412 </template> 438 </template>
413 </polymer-element> 439 </polymer-element>
414 440
415 <polymer-element name="debugger-input" extends="observatory-element"> 441 <polymer-element name="debugger-input" extends="observatory-element">
416 <template> 442 <template>
417 <link rel="stylesheet" href="css/shared.css"> 443 <link rel="stylesheet" href="css/shared.css">
418 <style> 444 <style>
419 .textBox { 445 .textBox {
420 margin: 20px; 446 margin: 20px;
421 font: 400 16px consolas, courier, monospace; 447 font: 400 16px consolas, courier, monospace;
422 width: 95%; 448 width: 95%;
423 } 449 }
424 </style> 450 </style>
425 <input id="textBox" class="textBox" type="text" value="{{ text }}" autofocus > 451 <input id="textBox" class="textBox" type="text" value="{{ text }}" autofocus >
426 </template> 452 </template>
427 </polymer-element> 453 </polymer-element>
428 454
429 <script type="application/dart" src="debugger.dart"></script> 455 <script type="application/dart" src="debugger.dart"></script>
OLDNEW
« no previous file with comments | « runtime/observatory/lib/src/elements/debugger.dart ('k') | runtime/observatory/lib/src/elements/eval_box.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698