Skip to content

[wasm][debugger] Escape values in expression evaluation scripts - #10217

Merged
akoeplinger merged 1 commit into
dotnet:mainfrom
ilonatommy:literal-formatting
Oct 14, 2026
Merged

akoeplinger merged 1 commit into
dotnet:mainfrom
ilonatommy:literal-formatting

Conversation

@ilonatommy

Copy link
Copy Markdown
Member

Applying the changes from #10198, #10186 to main.

Use Roslyn literal formatting for strings and characters embedded in generated C# so debuggee values remain data during expression evaluation.

…generated C# so debuggee values remain data during expression evaluation.
@ilonatommy ilonatommy self-assigned this Oct 14, 2026
Copilot AI balanced review requested due to automatic review settings October 14, 2026 10:09
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team October 14, 2026 10:09
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

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.

🟢 Approval recommended

The focused changes consistently prevent debuggee values from altering generated C# syntax.

0 open findings

What changed in this PR

Ports debugger expression-evaluation escaping fixes to main.

Changes:

  • Adds Roslyn-based C# string and character literal formatting.
  • Escapes debuggee values and object metadata before generating scripts.
File Description
src/​runtime/​src/​mono/​browser/​debugger/​BrowserDebugProxy/​EvaluateExpression.cs Safely formats values embedded in generated C#.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

@ilonatommy
ilonatommy enabled auto-merge October 14, 2026 11:32
@akoeplinger

Copy link
Copy Markdown
Member

Failure is unrelated: #10115

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