Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: a second, better take on the call stack view for tests #221649

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/vs/platform/actions/common/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class MenuId {
static readonly DebugWatchContext = new MenuId('DebugWatchContext');
static readonly DebugToolBar = new MenuId('DebugToolBar');
static readonly DebugToolBarStop = new MenuId('DebugToolBarStop');
static readonly DebugCallStackToolbar = new MenuId('DebugCallStackToolbar');
static readonly EditorContext = new MenuId('EditorContext');
static readonly SimpleEditorContext = new MenuId('SimpleEditorContext');
static readonly EditorContent = new MenuId('EditorContent');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,28 @@ const FOCUSED_STACK_FRAME_MARGIN: IModelDecorationOptions = {
color: themeColorFromId(focusedStackFrameColor)
}
};
const TOP_STACK_FRAME_DECORATION: IModelDecorationOptions = {
export const TOP_STACK_FRAME_DECORATION: IModelDecorationOptions = {
description: 'top-stack-frame-decoration',
isWholeLine: true,
className: 'debug-top-stack-frame-line',
stickiness
};
const FOCUSED_STACK_FRAME_DECORATION: IModelDecorationOptions = {
export const FOCUSED_STACK_FRAME_DECORATION: IModelDecorationOptions = {
description: 'focused-stack-frame-decoration',
isWholeLine: true,
className: 'debug-focused-stack-frame-line',
stickiness
};

export const makeStackFrameColumnDecoration = (noCharactersBefore: boolean): IModelDecorationOptions => ({
description: 'top-stack-frame-inline-decoration',
before: {
content: '\uEB8B',
inlineClassName: noCharactersBefore ? 'debug-top-stack-frame-column start-of-line' : 'debug-top-stack-frame-column',
inlineClassNameAffectsLetterSpacing: true
},
});

export function createDecorationsForStackFrame(stackFrame: IStackFrame, isFocusedSession: boolean, noCharactersBefore: boolean): IModelDeltaDecoration[] {
// only show decorations for the currently focused thread.
const result: IModelDeltaDecoration[] = [];
Expand All @@ -85,14 +94,7 @@ export function createDecorationsForStackFrame(stackFrame: IStackFrame, isFocuse

if (stackFrame.range.startColumn > 1) {
result.push({
options: {
description: 'top-stack-frame-inline-decoration',
before: {
content: '\uEB8B',
inlineClassName: noCharactersBefore ? 'debug-top-stack-frame-column start-of-line' : 'debug-top-stack-frame-column',
inlineClassNameAffectsLetterSpacing: true
},
},
options: makeStackFrameColumnDecoration(noCharactersBefore),
range: columnUntilEOLRange
});
}
Expand Down
Loading
Loading