Skip to content

Commit

Permalink
debug: suport presentationHint = "subtle"
Browse files Browse the repository at this point in the history
fixes #25162
  • Loading branch information
isidorn committed May 29, 2017
1 parent 9b7daa8 commit b0b5d17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/vs/workbench/parts/debug/browser/media/debugViewlet.css
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@
font-style: italic;
}

.debug-viewlet .debug-call-stack .stack-frame.subtle {
font-style: italic;
}

.debug-viewlet .debug-call-stack .stack-frame.label > .file {
display: none;
}
Expand Down
6 changes: 4 additions & 2 deletions src/vs/workbench/parts/debug/electron-browser/debugViewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,10 @@ export class CallStackRenderer implements IRenderer {
}

private renderStackFrame(stackFrame: debug.IStackFrame, data: IStackFrameTemplateData): void {
stackFrame.source.presenationHint === 'deemphasize' ? dom.addClass(data.stackFrame, 'disabled') : dom.removeClass(data.stackFrame, 'disabled');
stackFrame.source.presenationHint === 'label' ? dom.addClass(data.stackFrame, 'label') : dom.removeClass(data.stackFrame, 'label');
dom.toggleClass(data.stackFrame, 'disabled', stackFrame.source.presenationHint === 'deemphasize');

This comment has been minimized.

Copy link
@rkeithhill

rkeithhill Jun 10, 2017

@isidorn I believe you have a typo here presenationHint should be presentationHint (missing a t). Ditto for the next two lines. Also, I'm looking at the protocol here: https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts#L1129 and the presentationHint field is both on StackFrame and Source. It appears the one on Source takes the deemphasize value and the other two below are assigned to the StackFrame.PresentationHint field - not stackFrame.source.presentationHint but stackFrame.presentationHint, right?

dom.toggleClass(data.stackFrame, 'label', stackFrame.source.presenationHint === 'label');
dom.toggleClass(data.stackFrame, 'subtle', stackFrame.source.presenationHint === 'subtle');

data.file.title = stackFrame.source.raw.path || stackFrame.source.name;
if (stackFrame.source.raw.origin) {
data.file.title += `\n${stackFrame.source.raw.origin}`;
Expand Down

1 comment on commit b0b5d17

@isidorn
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rkeithhill thanks for the typo, I have fixed it via 3d3167a
Sometimes a stackFrame can have no source. As for possible incosistencies in the protocol please create new issues in https://github.com/Microsoft/vscode-debugadapter-node
More about presentationHint can be found here #5552

Please sign in to comment.