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

Debug frame indicator should go in the same decoration column as breakpoints #180439

Closed
roblourens opened this issue Apr 20, 2023 · 5 comments · Fixed by #180448
Closed

Debug frame indicator should go in the same decoration column as breakpoints #180439

roblourens opened this issue Apr 20, 2023 · 5 comments · Fixed by #180448
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Milestone

Comments

@roblourens
Copy link
Member

image

This leads to the editor shifting to the right every time I pause, because it's adding an editor gutter. We actually already have a combo decoration that shows the two things together. I don't actually know exactly how that works but can look it up if you need it.

Actually this combo decoration doesn't exist for all breakpoint types, which is annoying, but that's an issue for me

@joyceerhl joyceerhl added the bug Issue identified by VS Code Team member as probable bug label Apr 20, 2023
@joyceerhl joyceerhl added this to the April 2023 milestone Apr 20, 2023
@joyceerhl
Copy link
Collaborator

joyceerhl commented Apr 20, 2023

We actually already have a combo decoration

If you have a code pointer that would be awesome, I wasn't aware we had a notion of combined decorations today. As far as I know in the past we merged the classnames for any decorations that wanted to appear in the glyph margin

if (classNames.length === 0) {
output[lineIndex] = '';
} else {
output[lineIndex] = (
'<div class="cgmr codicon '
+ classNames.join(' ')
+ common
);
}

@roblourens
Copy link
Member Author

So when I see this

image

there is a ::before and an ::after, that is where the different colors come from

I think the ::before comes from the normal decoration, then we set the ::after content here

.codicon-debug-breakpoint.codicon-debug-stackframe-focused::after,
.codicon-debug-breakpoint.codicon-debug-stackframe::after {
content: '\eb8a';
position: absolute;
}

and color here

collector.addRule(`
${icons.allBreakpoints.map(b => `.monaco-workbench ${ThemeIcon.asCSSSelector(b.regular)}`).join(',\n ')},
.monaco-workbench ${ThemeIcon.asCSSSelector(icons.debugBreakpointUnsupported)},
.monaco-workbench ${ThemeIcon.asCSSSelector(icons.debugBreakpointHint)}:not([class*='codicon-debug-breakpoint']):not([class*='codicon-debug-stackframe']),
.monaco-workbench ${ThemeIcon.asCSSSelector(icons.breakpoint.regular)}${ThemeIcon.asCSSSelector(icons.debugStackframeFocused)}::after,
.monaco-workbench ${ThemeIcon.asCSSSelector(icons.breakpoint.regular)}${ThemeIcon.asCSSSelector(icons.debugStackframe)}::after {
color: ${debugIconBreakpointColor} !important;
}
`);

It seems like we are hacking editor decorations with css a bit

@roblourens
Copy link
Member Author

Maybe the solution is just making sure that whatever logic puts breakpoints in their own lane applies to all debug decorations though, so these all get their own lane and its the same, if that makes sense

@roblourens
Copy link
Member Author

The actual stackframe decorations come from here

export function createDecorationsForStackFrame(stackFrame: IStackFrame, isFocusedSession: boolean, noCharactersBefore: boolean): IModelDeltaDecoration[] {

@joyceerhl
Copy link
Collaborator

The trouble is now we also have this notion of a zIndex to ensure e.g. that testing decorations always render atop other decorations, so if there are multiple decorations in the same lane we pick the first one and discard the rest.

To show those decorations together, I think I have to restore the old behavior so that decorations with the same zIndex get the classnames combined like in the previous stable. But as you said that only works because of some CSS hackery, maybe we also want a more formalized way to combine decorations.

@vscodenpa vscodenpa added unreleased Patch has not yet been released in VS Code Insiders insiders-released Patch has been released in VS Code Insiders and removed unreleased Patch has not yet been released in VS Code Insiders labels Apr 20, 2023
@roblourens roblourens added the verified Verification succeeded label Apr 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug insiders-released Patch has been released in VS Code Insiders verified Verification succeeded
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants