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

Can't start extension host if extension has different name than folder. No warnings present. #411

Open
hudmarc opened this issue Apr 23, 2023 · 0 comments
Assignees

Comments

@hudmarc
Copy link

hudmarc commented Apr 23, 2023

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.77.3 (Universal)
  • OS Version: macOS Monterey 12.5

Steps to Reproduce:

  1. Create a folder
  2. Follow the "Your First Extension" guide at https://code.visualstudio.com/api/get-started/your-first-extension
  3. When prompted by "yo code" for a name for your extension, enter your own extension name instead of just using the name of the folder you are creating the extension in (which is the default option)
  4. This will create the extension in a subfolder of the workspace root, where the subfolder will have the name you set for your extension.
  5. This is a problem because the "Run Extension" dialog will not come up, and this will make debugging impossible.

Some potential ways to fix this, sorted by feasibility/ease of fixing:
A) Warn people that changing the name of your extension will NOT rename the folder, it will create the extension in a subfolder of your workspace root
B) Remove the option in yo code to rename your extension and just force extension authors to use the folder name as the name for their extension
C) Change how extensions are detected so that extensions in a subfolder of a workspace root are detected as such and the "Run Extension" popup is spawned
D) Rename the workspace root so it matches the new name, instead of creating a subfolder (which VSCode then will not detect as an extension) [this would probably be quite destructive, e.g. if someone has a particular folder name and then it is changed and they try to find it again they won't be able to find it because the name changed)

When googling for results to this issue, this microsoft/vscode#58470 comes up, but nowhere is it mentioned to make sure the name of the extension matches the folder name (or to just leave the name to default, which will name it after the directory anyways)

@sandy081 sandy081 assigned aeschli and unassigned sandy081 Apr 24, 2023
@aeschli aeschli transferred this issue from microsoft/vscode Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants