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

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: 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 </script-inset> 268 </script-inset>
259 </div> 269 </div>
260 <div class="flex-item-40-percent"> 270 <div class="flex-item-vars">
261 <div style="padding:10px;" class="memberList"> 271 <div style="padding:10px;" class="memberList">
262 <template repeat="{{ v in frame['vars'] }}"> 272 <template repeat="{{ v in frame['vars'] }}">
263 <div class="memberItem"> 273 <div class="memberItem">
264 <div class="memberName">{{ v['name']}}</div> 274 <div class="memberName">{{ v['name']}}</div>
265 <div class="memberValue"> 275 <div class="memberValue">
266 <any-service-ref ref="{{ v['value'] }}"> 276 <any-service-ref ref="{{ v['value'] }}">
267 </any-service-ref> 277 </any-service-ref>
268 </div> 278 </div>
269 </div> 279 </div>
270 </template> 280 </template>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 } 332 }
323 .messageOuter:hover .messageExpander { 333 .messageOuter:hover .messageExpander {
324 display: inline-block; 334 display: inline-block;
325 } 335 }
326 .messageContractor { 336 .messageContractor {
327 position: absolute; 337 position: absolute;
328 right: 5px; 338 right: 5px;
329 bottom: 5px; 339 bottom: 5px;
330 display: inline-block; 340 display: inline-block;
331 } 341 }
342 .flex-item-script {
343 flex-grow: 1;
344 flex-shrink: 1;
345 flex-basis: 765px;
346 }
347 .flex-item-vars {
348 flex-grow: 5;
349 flex-shrink: 0;
350 flex-basis: 225px;
351 }
332 </style> 352 </style>
333 <div id="messageOuter" class="messageOuter"> 353 <div id="messageOuter" class="messageOuter">
334 <a on-click="{{ toggleExpand }}"> 354 <a on-click="{{ toggleExpand }}">
335 <div class="messageSummary"> 355 <div class="messageSummary">
336 <div class="messageSummaryText"> 356 <div class="messageSummaryText">
337 <div class="messageId"><b>message {{ message['depth'] }}</b></div> 357 <div class="messageId"><b>message {{ message['depth'] }}</b></div>
338 <function-ref ref="{{ message['handlerFunction'] }}"></function-ref> 358 <function-ref ref="{{ message['handlerFunction'] }}"></function-ref>
339 ( <script-ref ref="{{ message['handlerScript'] }}" 359 ( <script-ref ref="{{ message['handlerScript'] }}"
340 pos="{{ message['handlerTokenPos'] }}"> 360 pos="{{ message['handlerTokenPos'] }}">
341 </script-ref> ) 361 </script-ref> )
342 </div> 362 </div>
343 <template if="{{ !expanded }}"> 363 <template if="{{ !expanded }}">
344 <div class="messageExpander"> 364 <div class="messageExpander">
345 <icon-expand-more></icon-expand-more> 365 <icon-expand-more></icon-expand-more>
346 </div> 366 </div>
347 </template> 367 </template>
348 </div> 368 </div>
349 </a> 369 </a>
350 370
351 <template if="{{expanded}}"> 371 <template if="{{expanded}}">
352 <div class="messageDetails"> 372 <div class="messageDetails">
353 <div class="flex-row"> 373 <div class="flex-row-wrap">
354 <div class="flex-item-60-percent"> 374 <div class="flex-item-script">
355 <template if="{{ message['handlerFunction'] != null }}"> 375 <template if="{{ message['handlerFunction'] != null }}">
356 <script-inset height="{{ scriptHeight }}" 376 <script-inset height="{{ scriptHeight }}"
357 script="{{ message['handlerFunction'].script }}" 377 script="{{ message['handlerFunction'].script }}"
358 startPos="{{ message['handlerFunction'].tokenPos }}" 378 startPos="{{ message['handlerFunction'].tokenPos }}"
359 endPos="{{ message['handlerFunction'].endTokenPos }} " 379 endPos="{{ message['handlerFunction'].endTokenPos }} "
360 inDebuggerContext="{{ true }}"> 380 inDebuggerContext="{{ true }}">
361 </script-inset> 381 </script-inset>
362 </template> 382 </template>
363 </div> 383 </div>
364 <div class="flex-item-40-percent"> 384 <div class="flex-item-vars">
365 <div class="memberItem"> 385 <div class="memberItem">
366 <div class="memberName"></div> 386 <div class="memberName"></div>
367 <div class="memberValue"> 387 <div class="memberValue">
368 <eval-link callback="{{ previewMessage }}" label="[preview]" r esult="{{ preview }}"></eval-link> 388 <eval-link callback="{{ previewMessage }}" label="[preview]" r esult="{{ preview }}"></eval-link>
369 </div> 389 </div>
370 </div> 390 </div>
371 </div> 391 </div>
372 </div> 392 </div>
373 <div class="messageContractor"> 393 <div class="messageContractor">
374 <template if="{{expanded}}"> 394 <template if="{{expanded}}">
(...skipping 18 matching lines...) Expand all
393 .normal { 413 .normal {
394 font: normal 14px consolas, courier, monospace; 414 font: normal 14px consolas, courier, monospace;
395 white-space: pre; 415 white-space: pre;
396 line-height: 125%; 416 line-height: 125%;
397 } 417 }
398 .bold { 418 .bold {
399 font: bold 14px consolas, courier, monospace; 419 font: bold 14px consolas, courier, monospace;
400 white-space: pre; 420 white-space: pre;
401 line-height: 125%; 421 line-height: 125%;
402 } 422 }
423 .red {
424 font: normal 14px consolas, courier, monospace;
425 white-space: pre;
426 line-height: 125%;
427 color: red;
428 }
403 .spacer { 429 .spacer {
404 height: 20px; 430 height: 20px;
405 } 431 }
406 </style> 432 </style>
407 <div id="consoleText" class="console"> 433 <div id="consoleText" class="console">
408 <!-- Console output is added programmatically here using the 'normal' 434 <!-- Console output is added programmatically here using the 'normal'
409 and 'bold' styles. --> 435 and 'bold' styles. -->
410 </div> 436 </div>
411 </template> 437 </template>
412 </polymer-element> 438 </polymer-element>
413 439
414 <polymer-element name="debugger-input" extends="observatory-element"> 440 <polymer-element name="debugger-input" extends="observatory-element">
415 <template> 441 <template>
416 <link rel="stylesheet" href="css/shared.css"> 442 <link rel="stylesheet" href="css/shared.css">
417 <style> 443 <style>
418 .textBox { 444 .textBox {
419 margin: 20px; 445 margin: 20px;
420 font: 400 16px consolas, courier, monospace; 446 font: 400 16px consolas, courier, monospace;
421 width: 95%; 447 width: 95%;
422 } 448 }
423 </style> 449 </style>
424 <input id="textBox" class="textBox" type="text" value="{{ text }}" autofocus > 450 <input id="textBox" class="textBox" type="text" value="{{ text }}" autofocus >
425 </template> 451 </template>
426 </polymer-element> 452 </polymer-element>
427 453
428 <script type="application/dart" src="debugger.dart"></script> 454 <script type="application/dart" src="debugger.dart"></script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698