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

When removing a folder from the workspace, the associated launch config still shows up in the debug widgets #12663

Closed
Maddobun opened this issue Jun 29, 2023 · 2 comments · Fixed by #12674
Labels
debug issues that related to debug functionality

Comments

@Maddobun
Copy link
Contributor

Bug Description:

After removing a folder from a multi-root workspace, debug configuration associated to that folder is still present in the debug widget dropdown

Steps to Reproduce:

  1. Open a multi-root work space
  2. Verify that launch configuration for each root show up in the debug dropdown
  3. Remove one of the root folder by right click -> remove folder from workspace
  4. Verify that all launch configuration still persist

Additional Information

  • Operating System: Ubuntu 22.04
  • Theia Version: 1.37.0
@Maddobun
Copy link
Contributor Author

protected async doInit(): Promise<void> {
this.debugConfigurationTypeKey = this.contextKeyService.createKey<string>('debugConfigurationType', undefined);
this.initialized = this.preferences.ready.then(() => {
this.preferences.onPreferenceChanged(e => {
if (e.preferenceName === 'launch') {
this.updateModels();
}
});
return this.updateModels();
});
}

My idea would be adding a callback workspaceService.onWorkspaceChanged(this.updateModels) on line 108, any thoughts?

@vince-fugnitto vince-fugnitto added the debug issues that related to debug functionality label Jun 29, 2023
@vince-fugnitto
Copy link
Member

@Maddobun the idea seems promising, if you're interested you can contribute a pull-request where we can perform an in-depth review.

Maddobun pushed a commit to Maddobun/theia that referenced this issue Jun 30, 2023
Maddobun pushed a commit to Maddobun/theia that referenced this issue Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debug issues that related to debug functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants