Skip to content

Extension Host Stuck on Building  #221990

@ospira

Description

@ospira

Does this issue occur when all extensions are disabled?: N/A because I'm trying to debug an extension using your instructions here - https://code.visualstudio.com/api/get-started/your-first-extension - and that is what isn't working.

  • VS Code Version: Version: 1.91.1 (Universal) Commit: f1e16e1
  • OS Version: MacBook Air M1 Sonoma 14.5

Steps to Reproduce:

  1. Follow the instructions here - https://code.visualstudio.com/api/get-started/your-first-extension
  2. Watch as multiple calls to the first step (Inside the editor, open src/extension.ts and press F5 or run the command Debug: Start Debugging from the Command Palette (⇧⌘P). This will compile and run the extension in a new Extension Development Host window.) frequently result in no second vs code window (in this case the second window i take it is meant to be the "extension development host") - it just hangs like so and even when the second window does show up it feels extremely brittle:
image

I was not able to get it to output Hello World from HelloWorld! once, and yes the engine is compatible in package.json and I chose the same settings from the generator. The one time the extension host loaded correctly without hanging when I was able to run the command from the command palette as instructed, the extension host then said it couldn't find the command... even though it is of course registered and was in the typeahead in the command box so I didn't understand why I got an error like that fresh from the generator... it also flashed the error at me but because now I have two vs code windows which tbh is a little confusing and it seems to usually hang on trying to run it again i'm not sure what the precise error was, as that was the farthest I got as it would get stuck if i tried to rerun it.

I have a suspicion the hanging/brittleness might be related to (again, just a suspicion) the extension host maybe having a cache or something because before using the generator, I tried to follow the same instructions but with my own (non-generator) source code, and it was buggy, so I closed vs code, rm'd my extension dir, and redid the extension from the generator with config as exactly specified in the tutorial to see if that would work. But I noticed initially while running it in this way that when I do the start debugging command sometimes it appeared as if it was running the old code because it had references to "web" in the extension host which I believe was from my prior attempts (I am really trying to debug a vs code web extension - but that seemed even more buggy so I then backed up and tried to just get the tutorial to run). Now those references are gone but it still hangs...

Am I doing something way off or is the extension dev experience just really brittle, maybe especially on macs? Is there some prerequisite I missed in the documentation? I know compiling vs code from the source or compiling an extension can take a while so I was trying to use the ecosystem to support faster iteration, but the devx and it's apparent readiness to hang is just really disappointing.

It would be really nice as a start if the first step (Debug: Start Debugging from the Command Palette (⇧⌘P)) from a fresh window on that generated code didn't frequently hang. Or if there was a clear way to just get it to stop I tried Debug: Stop sometimes to get the loading indicator to stop and that never worked, and then the editor UI state would get out of sync with the loading state because i would get the Debug: Start Debugging command back in the palette but the loader would still be going, even subsequently terminating the loader from the terminal view (screenshot below) and trying to run a new debugging command would then also just get stuck.

image

:(

Metadata

Metadata

Assignees

Labels

info-neededIssue requires more information from poster

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions