VSCode API in extension host uses "Null extension"
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 807
- Avg merge
- 10h 12m
- Merged PRs (30d)
- 7
Description
## Problem
When debugging the extension in the extension host several VSCode API's are falling back to using the default built in "Null extension", rather than registering the API for the toolkit extension. This has been observed in the latest commit`30507f96f57de5fb579d05e2238dd08a5af58da0` but the most likely root cause is the major refactoring to support multiple packages in the repository.
## Steps to reproduce the issue
1. `npm install`
2. Open the extension in the extension host using `Extension (toolkit)`
3. ~Toggle the `editor.inlineSuggest.enabled` setting~ Run the Command Palette command: `AWS: Edit Credentials`
4. Observe that you see "Null extension description" in the information window

Alternatively,
1. `npm install`
2. Open the extension in the extension host using `Extension (toolkit)`
3. Set a breakpoint on a URI listener e.g. `https://github.com/aws/aws-toolkit-vscode/blob/master/packages/core/src/codecatalyst/uriHandlers.ts#L49`
4. Trigger a uri listener
- e.g open `vscode://amazonwebservices.aws-toolkit-vscode/connect/codecatalyst?spaceName=foo&projectName=foo&devEnvironmentId=123123123123` in the browser
5. Observe that the extension host vscode window is focused but the uri handler breakpoint never gets hit
### Other things to note
- When registering `vscode.window.registerUriHandler` if you set a breakpoint in the debugger and then step in you eventually see that it's registering with the "Null extension" but you would expect the uri to register with the "aws toolkit extension"
- If you create a `vscode.window.showInformationWindow` inside of `toolkit/src/main.ts` then it shows that everything is registered with `AWS Toolkit - Amazon Q, CodeWhisperer, and more`
- If you create a `vscode.window.showInformationWindow` inside of `core/src/extension.ts` then it shows that everything is registered with `Null extension description'
## Expected behavior
Extension host and the compiled vsix behaviour should be the same (showInformationMessage should show `AWS Toolkit - Amazon Q, CodeWhisperer, and more`, uri breakpoint handlers should be hit, etc)
## System details (run the `AWS: About Toolkit` command)
- OS: Darwin x64 22.6.0
- Visual Studio Code extension host: 1.87.2
- AWS Toolkit: testPluginVersion
- node: 18.17.1
- electron: 27.3.2
Contributor guide
Research direction
Run npm install, open Extension (toolkit) in the extension host, and reproduce the AWS: Edit Credentials or URI-handler behavior. Compare the registration paths referenced in toolkit/src/main.ts and core/src/extension.ts, including the handler at packages/core/src/codecatalyst/uriHandlers.ts:49. Done means extension-host behavior matches the compiled VSIX, showing the toolkit name and reaching URI-handler breakpoints.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100