Skip to content

[browser] Add DiagnosticPorts to DOTNET_DiagnosticPorts environment variable - #122019

Merged
maraf merged 1 commit into
dotnet:mainfrom
maraf:WasmSdkDiagnosticsPort
Nov 28, 2025
Merged

maraf merged 1 commit into
dotnet:mainfrom
maraf:WasmSdkDiagnosticsPort

Conversation

@maraf

@maraf maraf commented Nov 27, 2025

Copy link
Copy Markdown
Member

We had this implemention in WasmAppBuilder. This PR promotes it to WasmSDK

@maraf maraf added this to the 11.0.0 milestone Nov 27, 2025
@maraf maraf self-assigned this Nov 27, 2025
Copilot AI review requested due to automatic review settings November 27, 2025 14:42
@maraf maraf added arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm labels Nov 27, 2025
@maraf
maraf enabled auto-merge (squash) November 27, 2025 14:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 promotes the DiagnosticPorts implementation from WasmAppBuilder to the WasmSDK level by adding support for the DiagnosticPorts MSBuild property to be automatically set as the DOTNET_DiagnosticPorts environment variable in browser WASM applications.

  • Adds DiagnosticPorts to the list of nested build properties in sample WASM builds
  • Creates a new MSBuild target _AddWasmDiagnosticPortsEnvironmentVariable that populates WasmEnvironmentVariable with the diagnostic ports configuration
  • Integrates this target into both build and publish workflows

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/mono/sample/wasm/Directory.Build.targets Adds DiagnosticPorts to the NestedBuildProperty item group to enable passing this property through nested builds
src/mono/nuget/Microsoft.NET.Sdk.WebAssembly.Pack/build/Microsoft.NET.Sdk.WebAssembly.Browser.targets Implements _AddWasmDiagnosticPortsEnvironmentVariable target and adds it as a dependency to both GenerateBuildWasmBootJsonDependsOn and GeneratePublishWasmBootJsonDependsOn to ensure diagnostic ports are configured in both build and publish scenarios

@maraf

maraf commented Nov 28, 2025

Copy link
Copy Markdown
Member Author

/ba-g Timeout is unrelated

@maraf
maraf merged commit fbe7c39 into dotnet:main Nov 28, 2025
@maraf
maraf deleted the WasmSdkDiagnosticsPort branch November 28, 2025 09:50
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Build-mono os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants