{"record":{"id":"8bfa69cfd84b4387","repo":"microsoft/aspire","slug":"this-version-of-the-aspire-extension-does-not-support","errorCode":null,"errorMessage":"This version of the Aspire extension does not support browser debugging. Please update the Aspire extension to use browser debugging support with WithBrowserDebugger().","messagePattern":"This version of the Aspire extension does not support browser debugging\\. Please update the Aspire extension to use browser debugging support with WithBrowserDebugger\\(\\)\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting.JavaScript/JavaScriptHostingExtensions.cs","lineNumber":2993,"sourceCode":"                    };\n                },\n                BrowserCapability);\n\n        return builder;\n    }\n\n    private static void ValidateBrowserCapability<T>(IResourceBuilder<T> builder) where T : IResource\n    {\n        var configuration = builder.ApplicationBuilder.Configuration;\n\n        try\n        {\n            if (configuration[\"DEBUG_SESSION_INFO\"] is { } debugSessionInfoJson\n                && JsonSerializer.Deserialize<DebugSessionCapabilities>(debugSessionInfoJson) is { } info\n                && info.SupportedLaunchConfigurations is not null\n                && !info.SupportedLaunchConfigurations.Contains(BrowserCapability))\n            {\n                throw new InvalidOperationException(\n                    \"This version of the Aspire extension does not support browser debugging. Please update the Aspire extension to use browser debugging support with WithBrowserDebugger().\");\n            }\n        }\n        catch (JsonException)\n        {\n            // If we can't parse the debug session info, skip validation\n        }\n    }\n\n    private sealed class DebugSessionCapabilities\n    {\n        [JsonPropertyName(\"supported_launch_configurations\")]\n        public string[]? SupportedLaunchConfigurations { get; set; }\n    }\n\n    private static void AddInstaller<TResource>(IResourceBuilder<TResource> resource, bool install) where TResource : JavaScriptAppResource\n    {\n        // Only install packages if in run mode","sourceCodeStart":2975,"sourceCodeEnd":3011,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting.JavaScript/JavaScriptHostingExtensions.cs#L2975-L3011","documentation":"Browser debugging for JavaScript resources is implemented via the Aspire VS Code extension, which advertises its capabilities (SupportedLaunchConfigurations) in a DEBUG_SESSION_INFO payload. If the extension's declared capabilities do not include the browser-launch capability, the app host throws this error because the connected extension is too old to accept the launch configuration.","triggerScenarios":"Running an AppHost whose JavaScript resource uses WithBrowserDebugger() while the installed Aspire VS Code extension version lacks the browser-debugging launch capability (SupportedLaunchConfigurations missing the BrowserCapability string).","commonSituations":"Working on a machine with an outdated Aspire VS Code extension while using a recent Aspire.Hosting SDK; CI or a teammate's environment with an older extension; DEBUG_SESSION_INFO containing valid JSON but an old capability list.","solutions":["Update the Aspire VS Code extension to the latest version and restart the debugging session.","If you cannot update, remove .WithBrowserDebugger() from the resource and launch the browser manually using the dashboard endpoint URL.","Verify the DEBUG_SESSION_INFO JSON contains the browser capability in SupportedLaunchConfigurations before calling WithBrowserDebugger()."],"exampleFix":"// before (old extension installed)\nvar app = builder.AddNpmApp(\"frontend\", \"./frontend\")\n    .WithBrowserDebugger();\n// after\nvar app = builder.AddNpmApp(\"frontend\", \"./frontend\"); // update extension, then re-add:\n// .WithBrowserDebugger();","handlingStrategy":"validation","validationCode":"var infoJson = configuration[\"DEBUG_SESSION_INFO\"];\nvar supportsBrowser = infoJson is not null &&\n    JsonSerializer.Deserialize<JsonElement>(infoJson)\n        .TryGetProperty(\"supportedLaunchConfigurations\", out var cfg) &&\n    cfg.EnumerateArray().Any(c => c.GetString() == \"browser\");\nif (!supportsBrowser) { /* skip WithBrowserDebugger or prompt extension update */ }","typeGuard":null,"tryCatchPattern":"try { app.WithBrowserDebugger(); } catch (InvalidOperationException ex) when (ex.Message.Contains(\"does not support browser debugging\")) { /* fall back to manual browser launch */ }","preventionTips":["Keep the Aspire VS Code extension auto-updated.","Gate WithBrowserDebugger() behind a capability check of DEBUG_SESSION_INFO.","Disable browser debugging in environments with pinned old extension versions."],"tags":["javascript","vscode-extension","browser-debugging","version-compatibility"],"backgroundTag":"incompatible-source-type","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}