Repository navigation
Fixes #16860: Improving exception experience - #20807
Conversation
|
Michel Kaporin (@michelkaporin), thanks for your PR! By analyzing the history of the files in this pull request, we identified Erich Gamma (@egamma) and Johannes Rieken (@jrieken) to be potential reviewers. |
|
Hi Michel Kaporin (@michelkaporin), I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution! TTYL, MSBOT; |
| background-color: #0C141F; | ||
| } | ||
|
|
||
| .monaco-editor .marker-widget > .stale { |
There was a problem hiding this comment.
Do not change unnecessary lines
| switch (marker.severity) { | ||
| case Severity.Error: | ||
| this.options.frameColor = '#ff5a5a'; | ||
| this._container.parentElement.classList.add('marker-error-widget'); |
There was a problem hiding this comment.
Make sure to remove the warning class in this case, same as when you add a warning class remove the error class
| @@ -16,15 +16,15 @@ | |||
| } | |||
There was a problem hiding this comment.
Looks good
| @@ -18,7 +18,6 @@ import { ICodeEditor, IOverlayWidget, IOverlayWidgetPosition, IViewZone, IViewZo | |||
| export interface IOptions { | |||
| showFrame?: boolean; | |||
There was a problem hiding this comment.
Make sure that references widget, peek view widget, error list widget and breakpoint widget are rendered the same as before.
| @@ -2,6 +2,7 @@ | |||
| * Copyright (c) Microsoft Corporation. All rights reserved. | |||
There was a problem hiding this comment.
Looks good
| @@ -6,6 +6,8 @@ | |||
| .monaco-editor .zone-widget .zone-widget-container.breakpoint-widget { | |||
| height: 30px !important; | |||
| display: flex; | |||
There was a problem hiding this comment.
Try to put it in one rule together
| .monaco-editor .debug-top-stack-frame-line { | ||
| .monaco-editor .debug-top-stack-frame-line, | ||
| .monaco-editor .debug-top-stack-frame-exception-line | ||
| { |
There was a problem hiding this comment.
Put the bracket on the previous line
| } | ||
| } | ||
|
|
||
| // exception widget |
There was a problem hiding this comment.
Why is this public?
| this.exceptionWidget.show({ lineNumber, column: 1 }, 3); | ||
| } | ||
|
|
||
| private hideExceptionWidget() { |
There was a problem hiding this comment.
Get rid fo this method
| this.exceptionWidget.hide(); | ||
| } | ||
|
|
||
| private closeExceptionWidget(): void { |
There was a problem hiding this comment.
No need to make difference between hide and close. Always destroy and recreate the widget as needed
| return; | ||
| } | ||
|
|
||
| // First call stack frame is the frame where exception has been thrown |
There was a problem hiding this comment.
Callstack can be an empty array in some corner cases
…g/error class application.
|
Michel Kaporin (@michelkaporin) looks good! Let's just do one more thing before we merge it in. The exception widget needs to respect the column of the top stack frame. Namely it shoudl have an arrow just like the find references widget pointing to the exact column location. Currently you use column:1 |
|
Isidor Nikolic (@isidorn) done. I've also noticed the background colour was applied to the arrow because it was inherited from zone-widget.css due to CSS refactoring. Please see 706773b for this. |
|
Michel Kaporin (@michelkaporin) looks good, merging in. I will still test it on my machine a bit and will drop by your machine so we polish it more. |
I have added an exception widget that shows a thrown exception message in a debug mode when such occurs.
Fixes #16860.
Also removed border colours from widget options and moved it to CSS. Pointer arrow for widget colour moved also to CSS from the code.