Skip to content

Support debugging browser and JavaScript apps in 13.2#14686

Merged
adamint merged 8 commits intodotnet:release/13.2from
adamint:dev/adamint/extensible-debug-support-13.2
Mar 4, 2026
Merged

Support debugging browser and JavaScript apps in 13.2#14686
adamint merged 8 commits intodotnet:release/13.2from
adamint:dev/adamint/extensible-debug-support-13.2

Conversation

@adamint
Copy link
Member

@adamint adamint commented Feb 25, 2026

Description

Backport of #12711 to release/13.2.

This PR reworks the debug support API so it's not tied to VS Code. The goal is to let any IDE plug in their own debug configuration by extending a common base. The debug infrastructure types are kept internal while exposing a minimal, IDE-agnostic public API surface.

Public API Surface (all marked [Experimental("ASPIREEXTENSION001")])

Aspire.Hosting:

  • WithDebugging<T>(builder, string projectPath) where T : ProjectResource — Configures debugging for project resources (only needed for custom ProjectResource inheritors)

Aspire.Hosting.JavaScript:

  • WithDebugging<T>(builder, string scriptPath) where T : NodeAppResource — Configures debugging for Node.js apps with a script path
  • WithDebugging<T>(builder) where T : JavaScriptAppResource — Configures debugging for JavaScript apps using package manager scripts
  • WithBrowserDebugger<T>(builder, string browser = "msedge") where T : JavaScriptAppResource — Configures browser debugging by creating a child browser debugger resource

Aspire.Hosting.Python:

  • WithDebugging<T>(builder) where T : PythonAppResource — Configures debugging for Python apps

Internal Infrastructure

All debug property classes, launch configuration types, and infrastructure methods are internal:

  • WithVSCodeDebugging (all packages) — now internal, delegated to by public WithDebugging
  • WithDebugSupport, WithDebuggerProperties, WithVSCodeDebugOptions
  • Per-language WithVSCode*DebuggerProperties methods
  • All types: ExecutableLaunchConfiguration, DebugAdapterProperties, VSCodeDebuggerPropertiesBase, SupportsDebuggingAnnotation, LaunchConfigurationProducerOptions, ProjectLaunchConfiguration, NodeLaunchConfiguration, BrowserLaunchConfiguration, etc.

Cross-assembly access is enabled via InternalsVisibleTo.

Key Design Concepts

  • DebugAdapterProperties — abstract base for DAP-standard properties any IDE can use
  • VSCodeDebuggerPropertiesBase — adds VS Code-specific options (presentation, preLaunchTask, serverReadyAction)
  • IDE filtering via AspireIde class and ExecutableDebuggerPropertiesAnnotation — annotations only fire when the matching IDE is running
  • Polymorphic JSON via DebugAdapterPropertiesJsonConverter for derived type serialization
  • IDE-agnostic public API — public methods are named WithDebugging/WithBrowserDebugger (not WithVSCodeDebugging) so the API is stable across IDE implementations

Summary of Changes

  • Made all debug property classes internal across Aspire.Hosting, Aspire.Hosting.JavaScript, and Aspire.Hosting.Python
  • Made all debug infrastructure methods internal (including WithVSCodeDebugging)
  • Added public WithDebugging methods across all packages that delegate to internal WithVSCodeDebugging
  • Kept public WithBrowserDebugger for JavaScript resources
  • Python's WithDebugging is no longer [Obsolete] — it is now the canonical public API
  • Added InternalsVisibleTo for cross-assembly access between hosting packages
  • Removed redundant shared file includes (now accessed via InternalsVisibleTo)
  • Fixed duplicate LaunchConfigurationAnnotator call in DcpExecutor.PreparePlainExecutables
  • Updated playground projects to use public APIs only

Merge conflict resolution

One conflict in DistributedApplicationBuilder.cs resolved by keeping the PR's IBackchannelLoggerProvider interface registration (the interface is available in the merged content from the PR branch).

Fixes #12529

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks> and <code/> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
    • No
  • Does the change require an update in our Aspire docs?
    • Yes
    • No

@adamint adamint requested a review from mitchdenny as a code owner February 25, 2026 18:19
Copilot AI review requested due to automatic review settings February 25, 2026 18:19
@github-actions
Copy link
Contributor

github-actions bot commented Feb 25, 2026

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 14686

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 14686"

… to release/13.2)

Reworks the debug support API so it's not tied to VS Code. Lets any IDE plug in
their own debug configuration by extending a common base.

Key changes:
- New class hierarchy: DebugAdapterProperties -> VSCodeDebuggerPropertiesBase -> concrete classes
- IDE detection via AspireIde class and ASPIRE_IDE env var
- Filtered annotations with optional ideType parameter
- Polymorphic JSON serialization for derived types
- VS Code extension simplified to spread debugger_properties directly
@adamint adamint force-pushed the dev/adamint/extensible-debug-support-13.2 branch from 5a4ede9 to d9fab7d Compare February 25, 2026 18:25
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 backports a reworked debugging extensibility API (originally from #12711) into release/13.2, introducing IDE-agnostic debug adapter properties, IDE filtering, and apphost-driven debug configuration serialization; it also includes additional perf tooling, VS Code extension updates, tests, and several repo engineering/pipeline adjustments.

Changes:

  • Introduces IDE-agnostic debug adapter properties (DebugAdapterProperties), VS Code–specific derived properties, and debugger-property annotations with optional IDE filtering.
  • Updates hosting/runtime behavior to produce launch configurations later (after endpoints are allocated) and adds tests around fallback-to-process behavior.
  • Updates the VS Code extension to consume debugger_properties directly and sets IDE/workspace-related environment variables.

Reviewed changes

Copilot reviewed 50 out of 50 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tools/perf/TraceAnalyzer/TraceAnalyzer.csproj Adds standalone TraceAnalyzer tool project.
tools/perf/TraceAnalyzer/Program.cs Implements nettrace parsing for Aspire startup events.
tools/perf/Measure-StartupPerformance.ps1 Adds PowerShell script to collect traces and compute startup timing.
tests/Aspire.Hosting.Tests/ExecutableResourceBuilderExtensionTests.cs Updates tests to new launch configuration producer options API.
tests/Aspire.Hosting.Tests/Dcp/DcpExecutorTests.cs Adds/updates tests for IDE execution and fallback behavior; updates executor construction.
tests/Aspire.Hosting.Python.Tests/AddPythonAppTests.cs Adds Python debug-support tests and related utilities.
tests/Aspire.Hosting.JavaScript.Tests/AddNodeAppTests.cs Adds Node/Vite/browser debug-support tests.
src/Shared/ResourceDebugSupportExtensions.cs Moves/renames debug-support helpers; adds supported-launch-config parsing.
src/Shared/KnownConfigNames.cs Adds ASPIRE_EXTENSION_WORKSPACE_ROOT config name.
src/Aspire.Hosting/SupportsDebuggingAnnotation.cs Makes SupportsDebuggingAnnotation public and changes launch config producer signature/options.
src/Aspire.Hosting/ResourceBuilderExtensions.cs Replaces WithDebugSupport signature and adds debugger-properties helper APIs.
src/Aspire.Hosting/ProjectResourceBuilderExtensions.cs Switches projects to new VS Code debugging helpers and adds related APIs.
src/Aspire.Hosting/ProjectLaunchConfiguration.cs Introduces ProjectLaunchConfiguration + VS Code C# debugger properties model.
src/Aspire.Hosting/ExecutableLaunchConfiguration.cs Adds AspireIde, DAP base properties, VS Code base properties, and JSON converter for derived types.
src/Aspire.Hosting/ExecutableDebuggerPropertiesAnnotation.cs Adds IDebuggerPropertiesAnnotation and typed debugger-properties annotation with optional IDE filtering.
src/Aspire.Hosting/DistributedApplicationBuilder.cs Changes backchannel logger provider registration to interface-based registration.
src/Aspire.Hosting/Dcp/Model/RunSessionInfo.cs Removes old internal RunSessionInfo model.
src/Aspire.Hosting/Dcp/Model/ModelCommon.cs Adds attribute + conditional JSON null-omission behavior for annotated types.
src/Aspire.Hosting/Dcp/Model/ExecutableLaunchConfiguration.cs Removes old internal executable launch configuration models (moved/reworked).
src/Aspire.Hosting/Dcp/DcpExecutor.cs Defers launch config production until endpoints exist; adds fallback-on-producer-throw behavior; injects backchannel logger provider.
src/Aspire.Hosting/CompatibilitySuppressions.xml Suppresses compatibility diagnostic for removed WithDebugSupport signature.
src/Aspire.Hosting/Backchannel/BackchannelLoggerProvider.cs Introduces IBackchannelLoggerProvider interface.
src/Aspire.Hosting/Aspire.Hosting.csproj Links ResourceDebugSupportExtensions.cs into Aspire.Hosting.
src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs Renames Python debugging API to WithVSCodeDebugging, adds VS Code debugger-properties support, and keeps obsolete alias.
src/Aspire.Hosting.Python/PythonAppLaunchConfiguration.cs Adds PythonLaunchConfiguration with debugger properties + VS Code Python debugger properties models.
src/Aspire.Hosting.Python/Aspire.Hosting.Python.csproj Stops compiling removed DCP model file; links shared debug/config helpers.
src/Aspire.Hosting.JavaScript/NodeLaunchConfiguration.cs Adds NodeLaunchConfiguration and VS Code Node debugger properties models.
src/Aspire.Hosting.JavaScript/JavaScriptHostingExtensions.cs Enables default VS Code debugging; adds VS Code debugging APIs and browser-debugger resource support.
src/Aspire.Hosting.JavaScript/BrowserLaunchConfiguration.cs Adds browser debugger resource + launch configuration and VS Code browser debugger properties models.
src/Aspire.Hosting.JavaScript/Aspire.Hosting.JavaScript.csproj Updates package metadata; links shared debug/config helpers.
src/Aspire.Cli/Utils/ExtensionHelper.cs Adds browser capability constant.
src/Aspire.Cli/Program.cs Treats RPC connection loss as non-unexpected during debug restart/shutdown.
src/Aspire.Cli/Interaction/ExtensionInteractionService.cs Handles connection-lost exceptions when reporting errors to the extension.
src/Aspire.Cli/Commands/RunCommand.cs Treats extension connection shutdown errors as expected during restart.
playground/python/Python.AppHost/Program.cs Updates playground to new VS Code debugging APIs for Python.
playground/Stress/Stress.AppHost/Program.cs Adds playground scenario to simulate debug configuration failure/fallback.
playground/AzureFunctionsEndToEnd/AzureFunctionsEndToEnd.AppHost/Program.cs Adds VS Code C# debugger-property customization example.
playground/AspireWithJavaScript/AspireJavaScript.React/webpack.config.js Enables source-map to improve debugging.
playground/AspireWithJavaScript/AspireJavaScript.NodeApp/app.js Adjusts 404 handler route matching behavior.
playground/AspireWithJavaScript/AspireJavaScript.MinimalApi/Properties/launchSettings.json Removes launchUrl entries.
playground/AspireWithJavaScript/AspireJavaScript.MinimalApi/AppHost.cs Removes Swagger setup and OpenAPI mapping call.
playground/AspireWithJavaScript/AspireJavaScript.AppHost/AspireJavaScript.AppHost.csproj Suppresses experimental warning for browser debugger API.
playground/AspireWithJavaScript/AspireJavaScript.AppHost/AppHost.cs Enables browser debugger with custom properties.
global.json Updates Arcade/Helix SDK versions used for repo builds.
extension/src/utils/workspace.ts Adds additional logging when CLI path isn’t valid.
extension/src/utils/AspireTerminalProvider.ts Sets ASPIRE_IDE and ASPIRE_EXTENSION_WORKSPACE_ROOT env vars for debug sessions.
extension/src/server/rpcClient.ts Makes stopCli resilient to connection shutdown.
extension/src/debugger/languages/python.ts Marks Python debugger extension as deprecated in favor of apphost debugger_properties.
extension/src/debugger/languages/dotnet.ts Adds isDeprecated flag (false) for .NET debugger extension.
extension/src/debugger/debuggerExtensions.ts Supports apphost-provided debugger_properties and deprecated extensions.
extension/src/dcp/types.ts Adds debugger_properties typing to executable launch config.
extension/src/dcp/AspireDcpServer.ts Accepts launch configs with apphost debugger properties even without a built-in debugger extension.
extension/src/capabilities.ts Adds node/browser capabilities and includes installed extension IDs as capabilities.
eng/restore-toolset.sh Makes MAUI restore toggle use env var defaulting safely.
eng/common/tools.sh Sets DOTNET_MULTILEVEL_LOOKUP=0 for deterministic builds and exports pipeline variable.
eng/common/tools.ps1 Sets DOTNET_MULTILEVEL_LOOKUP=0 and hardens VS requirement probing.
eng/common/templates/variables/pool-providers.yml Updates commented pool demand example to VS 2022 image.
eng/common/post-build/redact-logs.ps1 Adjusts parameter list formatting.
eng/common/native/install-dependencies.sh Adjusts distro branching logic for dependency installs.
eng/common/internal-feed-operations.sh Updates argument loop condition syntax.
eng/common/dotnet.sh Updates argument condition syntax for invoking dotnet with args.
eng/common/dotnet-install.sh Updates argument loop condition syntax.
eng/common/darc-init.sh Updates argument loop condition syntax.
eng/common/core-templates/steps/source-index-stage1-publish.yml Updates tool install args and version pins.
eng/common/core-templates/steps/source-build.yml Adjusts quoting for internal runtime download args.
eng/common/core-templates/steps/install-microbuild.yml Reworks MicroBuild install steps and removes preview template indirection.
eng/common/core-templates/steps/install-microbuild-impl.yml Removes now-unused MicroBuild install indirection template.
eng/common/core-templates/steps/generate-sbom.yml Updates SBOM package version parameter.
eng/common/core-templates/post-build/post-build.yml Re-indents/adjusts pipeline YAML, updates pool image references, and adds dotnet 8 note.
eng/common/core-templates/job/source-build.yml Updates linux pool image selection to Azure Linux 3 images.
eng/common/core-templates/job/publish-build-assets.yml Updates pool image references and minor formatting.
eng/common/core-templates/job/job.yml Removes preview MicroBuild parameters and a variable.
eng/common/build.sh Removes MAUI arg, updates argument loop condition syntax.
eng/common/build.ps1 Removes MAUI restore switch from usage/parameters.
eng/common/SetupNugetSources.sh Adds detection and enabling of dotnet-eng/tools internal feeds.
eng/common/SetupNugetSources.ps1 Adds detection and enabling of dotnet-eng/tools internal feeds.
eng/build.sh Changes MAUI restore triggering to env var.
eng/Versions.props Bumps repo minor version from 13.2 to 13.3 and updates Arcade-related version pins.
eng/Version.Details.xml Updates toolset dependency versions and SHAs.
docs/getting-perf-traces.md Adds PerfView verification heading tweak and perf script documentation section.
AGENTS.md Adds new startup-perf agent skill entry.
.github/workflows/daily-repo-status.md Adds daily repo status workflow definition source.
.github/workflows/ci.yml Adds backmerge-release.yml to CI workflow path filters.
.github/workflows/backmerge-release.yml Adds automated backmerge workflow from release/13.2 to main.
.github/workflows/README.md Documents the new backmerge workflow.
.github/skills/startup-perf/SKILL.md Adds skill documentation for startup perf measurement tooling.
.github/policies/milestoneAssignment.prClosed.yml Updates milestone assignment logic for main and release branches.
.gitattributes Marks .github/workflows/*.lock.yml as generated and sets merge strategy.
Comments suppressed due to low confidence (1)

src/Shared/ResourceDebugSupportExtensions.cs:11

  • ResourceDebugSupportExtensions.cs has unused using directives (e.g., Aspire.Hosting.Dcp and Microsoft.Extensions.DependencyInjection). With warnings-as-errors this can break the build; please remove any unused usings.

Comment on lines +69 to +70
extensionLogOutputChannel.error(`Failed to create debug configuration for ${JSON.stringify(launchConfig)} - resulting configuration was undefined or empty.`);
throw new Error(invalidLaunchConfiguration(JSON.stringify(configuration)));
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This throws invalidLaunchConfiguration(JSON.stringify(configuration)) when configuration is undefined. With strict TS settings, JSON.stringify(undefined) is undefined (not a string), so this won’t type-check and also loses the actual failing input. Pass a definite string (e.g., details about launchConfig / launchConfig.type) instead.

Suggested change
extensionLogOutputChannel.error(`Failed to create debug configuration for ${JSON.stringify(launchConfig)} - resulting configuration was undefined or empty.`);
throw new Error(invalidLaunchConfiguration(JSON.stringify(configuration)));
const failureDetails = JSON.stringify({ launchConfigType: launchConfig.type, launchConfig });
extensionLogOutputChannel.error(`Failed to create debug configuration for ${JSON.stringify(launchConfig)} - resulting configuration was undefined or empty.`);
throw new Error(invalidLaunchConfiguration(failureDetails));

Copilot uses AI. Check for mistakes.
Comment on lines +29 to +33
/// <summary>
/// Gets the action that annotates the launch configuration for the resource.
/// </summary>
/// <returns>Whether the annotation was applied successfully. If this throws, the resource will not be launched in IDE</returns>
internal Action<Executable, LaunchConfigurationProducerOptions> LaunchConfigurationAnnotator { get; }
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XML doc comment on LaunchConfigurationAnnotator uses a <returns> tag and describes a boolean return value, but the member is an Action<...> property. Please update the docs to use an appropriate tag (e.g., <value>) and describe the actual behavior (including the fallback-on-throw behavior if needed).

Copilot uses AI. Check for mistakes.
Comment on lines +3353 to +3357
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/> for method chaining.</returns>
/// <exception cref="InvalidOperationException">
/// Thrown when the current IDE is not VS Code (i.e., the <see cref="AspireIde.EnvironmentVariableName"/>
/// environment variable is not set to <see cref="AspireIde.VSCode"/>).
/// </exception>
Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XML docs for WithVSCodeDebugOptions claim it "validates" the current IDE and may throw if not VS Code, but the implementation only adds an IDE-filtered annotation and never throws. Please either implement the validation/exception or adjust the documentation to match actual behavior.

Copilot uses AI. Check for mistakes.
Comment on lines 154 to 157
env.DEBUG_SESSION_INFO = JSON.stringify(getRunSessionInfo());
env.ASPIRE_EXTENSION_CAPABILITIES = getSupportedCapabilities().join(',');
env.ASPIRE_EXTENSION_WORKSPACE_ROOT = vscode.workspace.workspaceFolders?.[0]?.uri.fsPath;

Copy link

Copilot AI Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ASPIRE_EXTENSION_WORKSPACE_ROOT may be set to undefined when VS Code has no workspace folder. That can flow into the AppHost as the literal string "undefined" and break relative-path display logic. Consider only setting this env var when a workspace folder exists (or set it to an empty string / omit it).

Copilot uses AI. Check for mistakes.
…s on restart

- Register BackchannelLoggerProvider as both ILoggerProvider and
  IBackchannelLoggerProvider so the logging pipeline can discover it.
- Clear launch configurations annotation before re-annotating in
  CreateExecutableAsync to prevent stale configs (with null
  debugger_properties due to abstract deserialization) from accumulating
  on resource restart.
@danegsta
Copy link
Member

danegsta commented Mar 2, 2026

@adamint I'd recommend we aim for a minimum viable approach to supporting JS and TypeScript in 13.2 (i.e. extend the existing approach used by Python) and keep the bulk of the new debugging APIs for 13.3 as part of the general debugging overhaul that's planned.

@adamint
Copy link
Member Author

adamint commented Mar 2, 2026

@adamint I'd recommend we aim for a minimum viable approach to supporting JS and TypeScript in 13.2 (i.e. extend the existing approach used by Python) and keep the bulk of the new debugging APIs for 13.3 as part of the general debugging overhaul that's planned.

I'll make everything internal

@adamint
Copy link
Member Author

adamint commented Mar 2, 2026

@adamint I'd recommend we aim for a minimum viable approach to supporting JS and TypeScript in 13.2 (i.e. extend the existing approach used by Python) and keep the bulk of the new debugging APIs for 13.3 as part of the general debugging overhaul that's planned.

I'll make everything internal

@danegsta done, the only things that are public now are WithDebugging and WithBrowserDebugger

adamint added 6 commits March 2, 2026 18:55
…erDebugger

- Made WithVSCodeDebugging internal across all packages (Hosting, JavaScript, Python)
- Added public WithDebugging methods that delegate to internal WithVSCodeDebugging:
  - WithDebugging<T>(builder, projectPath) for ProjectResource
  - WithDebugging<T>(builder, scriptPath) for NodeAppResource
  - WithDebugging<T>(builder) for JavaScriptAppResource
  - WithDebugging<T>(builder) for PythonAppResource
- WithBrowserDebugger<T>(builder, browser) remains public for JavaScriptAppResource
- Python WithDebugging is no longer [Obsolete], now marked [Experimental]
- All underlying types/infrastructure remain internal
- Removed playground calls to now-internal methods
…ties, WithVSCodePythonDebuggerProperties internal; split WithBrowserDebugger into public (no config) + internal (with config)
…l, split WithBrowserDebugger into public/internal overloads
- Fix Path.GetDirectoryName null-bypass with safe fallback
- Move JS debugger property defaults (SkipFiles, SourceMaps, AutoAttachChildProcesses) to field initializers
- Fix empty Python interpreter path: fallback to 'python' with warning
- Add 11 new tests across Hosting, JavaScript, and Python debug tests
@adamint adamint self-assigned this Mar 3, 2026
@adamint adamint changed the title Add better WithDebugSupport extensibility API (release/13.2 backport) Support debugging browser and JavaScript apps in 13.2 Mar 4, 2026
@adamint adamint merged commit 514d4bf into dotnet:release/13.2 Mar 4, 2026
346 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the 13.2 milestone Mar 4, 2026
@davidfowl
Copy link
Member

@danegsta all good with this?

@danegsta
Copy link
Member

danegsta commented Mar 5, 2026

@danegsta all good with this?

I think my only real concern is that we're going to have to make some breaking changes to the this API and types in 13.3 to match the lower level debug adapter config. As long as the VSCode extension side of these changes won't be an excessive burden to maintain for backwards compatibility with 13.2 going forwards I don't have any particular concerns. Although, knowing that we'll need to make changes, we should add a versioning property to the protocol to make that backwards compatibility easier to maintain.

@davidfowl
Copy link
Member

@adamint Can you revert this change then? I don't think we want this in 13.2 knowing we are reworkign debugging in 13.3

@adamint
Copy link
Member Author

adamint commented Mar 5, 2026

@adamint Can you revert this change then? I don't think we want this in 13.2 knowing we are reworkign debugging in 13.3

We can hide the apis but don’t we want js debug to work for 13.2?

@davidfowl
Copy link
Member

If the API is experimental and we do the work to make the migration experience smooth I am fine with it. What do we need to do to make that true?

@adamint
Copy link
Member Author

adamint commented Mar 5, 2026

If the API is experimental and we do the work to make the migration experience smooth I am fine with it. What do we need to do to make that true?

I don’t think anything is needed to make that true! If we want, we could just make the WithDebugging api internal.

@danegsta
Copy link
Member

danegsta commented Mar 5, 2026

If the API is experimental and we do the work to make the migration experience smooth I am fine with it. What do we need to do to make that true?

I don’t think anything is needed to make that true! If we want, we could just make the WithDebugging api internal.

I’m not specifically worried about the AppHost API as the public changes there are minimal an experimental; it’s any changes to the IDE protocol config that we’re sending via DCP and the changes in the extension required to support that. My concern is that’s extra VSCode extension logic we’ll have to support for a while, because regardless of whether the app host APIs are experimental/internal we’re still using the new data format in 13.2. We can’t remove it without breaking some parts of 13.2 debugging.

My point is that we need to be cognizant of that maintenance burden doing forward if we know we’re planning to make a breaking change again next release. Obviously we need to support JS debugging, but basing that on the existing Python debug approach would keep backwards compatibility at the protocol level simpler.

Your new API and config would form the basis of the 13.3 app host work with some tweaks to account for the fact that we’re configuring and running debug adapters directly, but there’ll be some fundamental changes in how that config is applied.

radical added a commit that referenced this pull request Mar 5, 2026
Conflict resolutions:

- eng/Versions.props: resolved by git rerere from prior merge
- src/Aspire.Cli/Telemetry/AspireCliTelemetry.cs: kept both using
  statements (Aspire.Hosting from main, System.Runtime.InteropServices
  from release/13.2)
- src/Aspire.Hosting.RemoteHost/Ats/AtsMarshaller.cs: took release/13.2
  which is a superset (adds ReferenceHandler.IgnoreCycles and
  TypeInfoResolver on top of main's JsonStringEnumConverter)
- src/Aspire.Hosting/Dcp/DcpExecutor.cs: took release/13.2 where PR
  #14686 refactored debugging launch config out of PrepareExecutables
  and into CreateExecutableAsync (after endpoint allocation)
- tests/Aspire.Hosting.RemoteHost.Tests/AtsMarshallerTests.cs: took
  release/13.2 which includes main's TestDtoWithEnum plus additional
  DTO types (SelfReferencingDto, ParentDto, ChildDto, etc.)
- tests/Aspire.Hosting.RemoteHost.Tests/CapabilityDispatcherTests.cs:
  combined both sides — kept main's enum deserialization tests
  (GetDto_DeserializesEnumPropertyFromString, etc.) and release/13.2's
  builder-to-resource unwrapping tests plus TestResourceBuilder<T>
- XLF localization files (21 files): took release/13.2 which removed
  per-resource start/stop strings and uses simpler stop description

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
adamint added a commit to adamint/aspire that referenced this pull request Mar 9, 2026
adamint added a commit to adamint/aspire that referenced this pull request Mar 9, 2026
adamint added a commit that referenced this pull request Mar 9, 2026
…" (#15064)

* Revert "Support debugging browser and JavaScript apps in 13.2 (#14686)"

This reverts commit 514d4bf.

* Remove withDebugging() call from Python ValidationAppHost

WithDebugging has no AspireExport attribute on this branch, so the
generated TypeScript SDK doesn't include it, causing tsc to fail.

* Regenerate CompatibilitySuppressions.xml for API compat
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
* Add better WithDebugSupport extensibility API (backport of #12711 to release/13.2)

Reworks the debug support API so it's not tied to VS Code. Lets any IDE plug in
their own debug configuration by extending a common base.

Key changes:
- New class hierarchy: DebugAdapterProperties -> VSCodeDebuggerPropertiesBase -> concrete classes
- IDE detection via AspireIde class and ASPIRE_IDE env var
- Filtered annotations with optional ideType parameter
- Polymorphic JSON serialization for derived types
- VS Code extension simplified to spread debugger_properties directly

* Fix BackchannelLoggerProvider DI registration and clear launch configs on restart

- Register BackchannelLoggerProvider as both ILoggerProvider and
  IBackchannelLoggerProvider so the logging pipeline can discover it.
- Clear launch configurations annotation before re-annotating in
  CreateExecutableAsync to prevent stale configs (with null
  debugger_properties due to abstract deserialization) from accumulating
  on resource restart.

* Make WithVSCodeDebugging internal, add public WithDebugging/WithBrowserDebugger

- Made WithVSCodeDebugging internal across all packages (Hosting, JavaScript, Python)
- Added public WithDebugging methods that delegate to internal WithVSCodeDebugging:
  - WithDebugging<T>(builder, projectPath) for ProjectResource
  - WithDebugging<T>(builder, scriptPath) for NodeAppResource
  - WithDebugging<T>(builder) for JavaScriptAppResource
  - WithDebugging<T>(builder) for PythonAppResource
- WithBrowserDebugger<T>(builder, browser) remains public for JavaScriptAppResource
- Python WithDebugging is no longer [Obsolete], now marked [Experimental]
- All underlying types/infrastructure remain internal
- Removed playground calls to now-internal methods

* Make WithVSCodeCSharpDebuggerProperties, WithVSCodeNodeDebuggerProperties, WithVSCodePythonDebuggerProperties internal; split WithBrowserDebugger into public (no config) + internal (with config)

* Fix JavaScript hosting: make WithVSCodeNodeDebuggerProperties internal, split WithBrowserDebugger into public/internal overloads

* Make all debug infrastructure types internal, fix csproj IVT entries and shared file includes

* Simplify debug infrastructure and add tests

- Fix Path.GetDirectoryName null-bypass with safe fallback
- Move JS debugger property defaults (SkipFiles, SourceMaps, AutoAttachChildProcesses) to field initializers
- Fix empty Python interpreter path: fallback to 'python' with warning
- Add 11 new tests across Hosting, JavaScript, and Python debug tests
Copilot AI pushed a commit that referenced this pull request Mar 10, 2026
…" (#15064)

* Revert "Support debugging browser and JavaScript apps in 13.2 (#14686)"

This reverts commit 514d4bf.

* Remove withDebugging() call from Python ValidationAppHost

WithDebugging has no AspireExport attribute on this branch, so the
generated TypeScript SDK doesn't include it, causing tsc to fail.

* Regenerate CompatibilitySuppressions.xml for API compat
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.

5 participants