[browser][coreCLR] native stack trace symbols#124483
Merged
pavelsavara merged 7 commits intodotnet:mainfrom Feb 19, 2026
Merged
[browser][coreCLR] native stack trace symbols#124483pavelsavara merged 7 commits intodotnet:mainfrom
pavelsavara merged 7 commits intodotnet:mainfrom
Conversation
Contributor
|
Tagging subscribers to this area: @agocke, @jeffschwMSFT, @elinor-fung |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements native stack trace symbolication for browser/CoreCLR by introducing support for dotnet.native.js.symbols files. When available, these symbol files enable the runtime to map WebAssembly function numbers in stack traces to human-readable function names, greatly improving debugging experience for browser applications.
Changes:
- Implements symbolication logic with regex-based pattern matching for different browser stack trace formats (V8, Chrome, Firefox)
- Refactors
normalizeExceptionfrom interop utils to loader logging for centralized exception handling with symbolication support - Adds infrastructure for loading and parsing native symbol files as optional assets during runtime initialization
- Enables
--emit-symbol-mapflag in CMake build and includes symbol files in runtime pack distribution
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/libs/System.Native.Browser/diagnostics/symbolicate.ts | Implements core symbolication logic with regex patterns for multiple browsers and symbol map parsing |
| src/native/libs/System.Native.Browser/diagnostics/index.ts | Exports new installNativeSymbols function for cross-module use |
| src/native/libs/System.Native.Browser/diagnostics/exit.ts | Refactors exit logging to use centralized normalizeException |
| src/native/corehost/browserhost/loader/logging.ts | Moves normalizeException here and integrates symbolication into exception formatting |
| src/native/corehost/browserhost/loader/assets.ts | Adds fetchNativeSymbols and fetchText for loading symbol files, plus content-type configuration |
| src/native/corehost/browserhost/loader/polyfills.ts | Enhances text() method to handle ArrayBuffer bodies using TextDecoder |
| src/native/corehost/browserhost/loader/run.ts | Integrates symbol file loading into runtime initialization flow |
| src/native/corehost/browserhost/loader/index.ts | Adds normalizeException to loader exports table |
| src/native/corehost/browserhost/loader/exit.ts | Updates error logging to use new error signature |
| src/native/corehost/browserhost/CMakeLists.txt | Enables --emit-symbol-map for all builds and installs symbol files |
| src/native/corehost/corehost.proj | Uncomments inclusion of dotnet.native.js.symbols in runtime pack |
| src/native/libs/System.Runtime.InteropServices.JavaScript.Native/interop/invoke-js.ts | Updates to use normalizeException from loader exports |
| src/native/libs/System.Runtime.InteropServices.JavaScript.Native/interop/utils.ts | Removes old normalizeException implementation |
| src/native/libs/Common/JavaScript/types/exchange.ts | Adds type definitions for new exports |
| src/native/libs/Common/JavaScript/cross-module/index.ts | Updates cross-module tables with new exports |
| src/mono/sample/wasm/Directory.Build.targets | Adds CleanSampleBinObj target for cleaning build directories |
src/native/libs/System.Native.Browser/diagnostics/symbolicate.ts
Outdated
Show resolved
Hide resolved
src/native/libs/System.Native.Browser/diagnostics/symbolicate.ts
Outdated
Show resolved
Hide resolved
This was referenced Feb 17, 2026
campersau
reviewed
Feb 17, 2026
src/native/libs/System.Native.Browser/diagnostics/symbolicate.ts
Outdated
Show resolved
Hide resolved
src/native/libs/System.Native.Browser/diagnostics/symbolicate.ts
Outdated
Show resolved
Hide resolved
This was referenced Feb 17, 2026
Open
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
src/native/libs/System.Runtime.InteropServices.JavaScript.Native/interop/utils.ts
Show resolved
Hide resolved
radekdoulik
reviewed
Feb 19, 2026
src/native/libs/System.Native.Browser/diagnostics/symbolicate.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
Member
Author
|
/ba-g failures are unrelated |
iremyux
pushed a commit
to iremyux/dotnet-runtime
that referenced
this pull request
Mar 2, 2026
Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also more work on
Fixes #122647
Fixes #76710
Fixes #122644
when
<EnableDiagnostics>true</EnableDiagnostics>and<WasmEmitSymbolMap>true</WasmEmitSymbolMap>it would translate native stack traces fromwasm-function[1018]form into a symbol name (even on Release build).Becomes