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

"Collapse All" button does not work in Debug -> Variables. Python. #95440

Closed
sartyukhov opened this issue Apr 16, 2020 · 4 comments
Closed

"Collapse All" button does not work in Debug -> Variables. Python. #95440

sartyukhov opened this issue Apr 16, 2020 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@sartyukhov
Copy link

  • VSCode Version: 1.44.1
  • OS Version: Manjaro Linux
  • Extensions: ["ms-python.python", "VisualStudioExptTeam.vscodeintellicode"]
    Steps to Reproduce:
  1. Start debugging python project in docker container with installed extensions.
  2. Stop somewhere by breakpoint
  3. Open Run -> Variables panel
  4. Click collapse all
  5. Nothing happend, at all

image

Does this issue occur when all extensions are disabled?: No. Can't debug python project without python extension.

@isidorn isidorn added the bug Issue identified by VS Code Team member as probable bug label Apr 17, 2020
@isidorn isidorn added this to the April 2020 milestone Apr 17, 2020
@isidorn isidorn added the debug Debug viewlet, configurations, breakpoints, adapter issues label Apr 17, 2020
@isidorn
Copy link
Contributor

isidorn commented Apr 17, 2020

@sartyukhov thanks for filling this.
@sbatten @sandy081 with the view refactoring work the timing changed when the view is asked for actions and when it is rendered. So actions were instiated before there was an instance of the tree present. I fixed this by changing the action to pass in the getter for the tree so it can retrieve it when it is being run not constructed

also fyi @jrieken since outline collapse all was broken and is now fixed

@sartyukhov
Copy link
Author

Cool, thanks!

@sandy081
Copy link
Member

Thanks for fixing @isidorn

May be we shall move away from old model getActions to use MenuRegistry ?

Eg:

this._register(registerAction2(class extends Action2 {
constructor() {
super({
id: `workbench.actions.treeView.${that.id}.collapseAll`,
title: localize('collapseAll', "Collapse All"),
menu: {
id: MenuId.ViewTitle,
when: ContextKeyExpr.and(ContextKeyEqualsExpr.create('view', that.id), that.collapseAllContextKey),
group: 'navigation',
order: Number.MAX_SAFE_INTEGER,
},
icon: { id: 'codicon/collapse-all' }
});
}
async run(): Promise<void> {
if (that.tree) {
return new CollapseAllAction<ITreeItem, ITreeItem, FuzzyScore>(that.tree, true).run();
}
}
}));
}

@isidorn
Copy link
Contributor

isidorn commented Apr 17, 2020

That works for me

@connor4312 connor4312 added the verified Verification succeeded label Apr 29, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Jun 1, 2020
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 debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants