Skip to content

Conversation

@jakebailey
Copy link
Member

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 tsgo is 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.)

Copy link
Contributor

Copilot AI left a 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 useTsgo is 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

@jakebailey jakebailey requested a review from Copilot November 25, 2025 18:56
Copilot finished reviewing on behalf of jakebailey November 25, 2025 19:00
Copy link
Contributor

Copilot AI left a 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.",
Copy link

Copilot AI Nov 25, 2025

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."

Suggested change
"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.",

Copilot uses AI. Check for mistakes.
Copy link
Member Author

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

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

Successfully merging this pull request may close these issues.

4 participants