ada-blazor-debug-verification

Diagnose and verify .NET 6 Blazor WASM runtime, DI, and rendering defects.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/wubing7755/Ada --skill ada-blazor-debug-verification-wubing7755
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ada-blazor-debug-verification
Source: https://github.com/wubing7755/Ada/tree/main/skills/software-development/ada-blazor-debug-verification
Command: npx skills add https://github.com/wubing7755/Ada --skill ada-blazor-debug-verification-wubing7755

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Debugging .NET 6 Blazor WebAssembly apps is full of framework-specific traps: optional [Inject] crashes, bUnit stale event handlers, DelegatingHandler inner-handler errors, and relative API paths hitting the frontend origin. This Skill provides a verified playbook of these pitfalls plus an end-to-end verification ladder (unit, bUnit, NuGet consumer sample) so fixes are proven, not assumed. ## Core Features & Use Cases - Framework-verified pitfall playbook: Thirteen documented pitfalls covering DI injection, bUnit render races, keyboard accessibility, raw string literals, HttpClient handler chains, and query-string parsing on net6.0. - Verification ladder: Structured gates from focused RED/GREEN test runs through solution-level dotnet test, format checks, and pinned-version NuGet consumer sample validation. - HTTP fake-handler guidance: A reference on designing HttpClient fakes that avoid serialization, routing, and pagination traps in Blazor WASM service tests. - Use Case: A bUnit test fails with UnknownEventHandlerIdException after a fire-and-forget re-render; the Skill diagnoses the pending-render race and prescribes flushing with cut.Render() before re-querying. ## Quick Start Ask the agent to debug a failing .NET 6 Blazor WASM component or bUnit test and verify the fix end-to-end.

Frequently Asked Questions about ada-blazor-debug-verification

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix optional [Inject] service crashes in .NET 6 Blazor?

.NET 6 does not support optional [Inject] properties; ComponentFactory throws InvalidOperationException for any unregistered service, including nullable types. Inject IServiceProvider instead and resolve manually with GetService plus a fallback default.

Why does bUnit throw UnknownEventHandlerIdException after a re-render?

A fire-and-forget StateHasChanged leaves a pending render, so the next click dispatches a stale handlerId. Flush the pending render with cut.Render() before re-querying elements and clicking again.

Why does new HttpClient with a DelegatingHandler fail in Blazor WASM?

Manual handler construction never sets InnerHandler, so the first request throws 'The inner handler has not been assigned'. Either set InnerHandler to WebAssemblyHttpMessageHandler or write auth headers directly to the singleton HttpClient's DefaultRequestHeaders.

Can I use raw string literals in a net6.0 test project?

No. Raw string literals require C# 11, which the net6.0 toolchain does not enable even with LangVersion=latest, producing CS8652. Write fixtures as escaped normal strings joined with newline characters.

Why do relative api/ paths return 404 in a Blazor WASM dual-mode app?

Relative paths resolve against the frontend origin, not the configured API base, and unit tests miss it because their BaseAddress is localhost. Route every call through one URL resolver and verify with a host-asserting test plus real browser submission.

When should I not use this debug-verification playbook?

Use it only for .NET 6 Blazor WASM debugging and verification. Build-gate checks belong to a .NET verification skill, JS interop failures to an interop skill, and writing new bUnit tests from scratch to a test-authoring skill.