Skip to content

Commit

Permalink
debug: decorate stackFrame ranges if provided
Browse files Browse the repository at this point in the history
fixes #8851
  • Loading branch information
isidorn committed May 11, 2017
1 parent b9988fe commit a5b701b
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/vs/workbench/parts/debug/browser/debugEditorModelManager.ts
Expand Up @@ -144,6 +144,12 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
options: DebugEditorModelManager.TOP_STACK_FRAME_DECORATION,
range: columnUntilEOLRange
});
if (stackFrame.range.endLineNumber && stackFrame.range.endColumn) {
result.push({
options: { className: 'debug-top-stack-frame-range' },
range: stackFrame.range
});
}

if (this.modelDataMap.has(modelUriStr)) {
const modelData = this.modelDataMap.get(modelUriStr);
Expand All @@ -161,6 +167,12 @@ export class DebugEditorModelManager implements IWorkbenchContribution {
options: DebugEditorModelManager.FOCUSED_STACK_FRAME_MARGIN,
range
});
if (stackFrame.range.endLineNumber && stackFrame.range.endColumn) {
result.push({
options: { className: 'debug-focused-stack-frame-range' },
range: stackFrame.range
});
}

result.push({
options: DebugEditorModelManager.FOCUSED_STACK_FRAME_DECORATION,
Expand Down
16 changes: 16 additions & 0 deletions src/vs/workbench/parts/debug/browser/media/debug.contribution.css
Expand Up @@ -13,6 +13,10 @@
background: rgba(255, 255, 102, 0.45);
}

.monaco-editor .debug-top-stack-frame-range {
background: #ffeca0;
}

.monaco-editor .debug-top-stack-frame-column::before {
background: url('current-arrow.svg') center center no-repeat;
}
Expand All @@ -21,6 +25,10 @@
background: rgba(206, 231, 206, 0.45);
}

.monaco-editor .debug-focused-stack-frame-range {
background: rgba(206, 231, 206, 1);
}

.monaco-editor .debug-breakpoint-hint-glyph {
background: url('breakpoint-hint.svg') center center no-repeat;
}
Expand Down Expand Up @@ -177,11 +185,19 @@
background: rgba(122, 189, 122, 0.3);
}

.monaco-editor.vs-dark .debug-focused-stack-frame-range {
background: rgba(122, 189, 122, 0.5);
}

.monaco-editor.vs-dark .debug-top-stack-frame-line,
.monaco-editor.vs-dark .debug-top-stack-frame-exception-line {
background-color: rgba(255, 255, 0, 0.2)
}

.monaco-editor.vs-dark .debug-top-stack-frame-range {
background-color: rgba(255, 255, 0, 0.3)
}

.monaco-editor.vs-dark .debug-breakpoint-glyph,
.monaco-editor.vs-dark .debug-breakpoint-column.debug-breakpoint-glyph-column::before {
background: url('breakpoint-dark.svg') center center no-repeat;
Expand Down

0 comments on commit a5b701b

Please sign in to comment.