-
Notifications
You must be signed in to change notification settings - Fork 744
Don't disable TS extension in debug launch task #2155
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the VS Code extension debugging configuration to allow the built-in TypeScript extension to run alongside the native preview extension during development. The extension activation logic is refactored to handle development mode more gracefully, warning users when settings conflict rather than force-disabling the main TypeScript extension.
Key Changes:
- Removes forced disabling of TypeScript extensions from launch configuration
- Adds intelligent handling for development mode when
useTsgois false, with user prompt to enable - Falls back to tsgo when built-in TS extension is disabled, regardless of setting
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| _extension/src/extension.ts | Refactors activation logic to handle development mode scenarios with warnings and fallback behavior |
| .vscode/launch.template.json | Removes --disable-extension flags for TypeScript extensions from debug launch configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| if (!tsExtension) { | ||
| if (!useTsgo) { | ||
| vscode.window.showWarningMessage( | ||
| "The built-in TypeScript extension is disabled. Sync launch.json with launch.template.json to reenable.", |
Copilot
AI
Nov 25, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the TypeScript extension is disabled and useTsgo is explicitly set to false, the warning message suggests syncing launch.json but doesn't clearly explain that tsgo will be activated anyway (overriding the user's setting). Consider making the message more explicit about this behavior, e.g., "The built-in TypeScript extension is disabled. TypeScript Native Preview will be forced to run. Sync launch.json with launch.template.json to allow the main extension to handle TypeScript."
| "The built-in TypeScript extension is disabled. Sync launch.json with launch.template.json to reenable.", | |
| "The built-in TypeScript extension is disabled. TypeScript Native Preview will be forced to run, overriding your 'typescript.experimental.useTsgo' setting. Sync launch.json with launch.template.json to allow the main extension to handle TypeScript.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, well I could make it full return if that's what @andrewbranch meant
Now that the main extension handles this gracefully, I think we should stop force disabling it in our launch options, instead allowing things to proceed but warning if
tsgois disabled for some reason. This should make it less annoying to test things that use VS Code settings defined in the main extension.If the main extension is disabled, then debugging will force tsgo, to at last continue supporting old launch configs. But, maybe that's overkill (but we would need to make everyone re-copy their launch configs.)