News

Debugging Problems Persist in Blazor WebAssembly 3.2 Preview 4

Debugging functionality is a pesky problem for the Blazor WebAssembly team, with many limitations still persisting in the project scheduled for a prime-time debut next month.

Blazor WASM debugging was foreshadowed in the Visual Studio roadmap early last month. Later in the month, Blazor WebAssembly 3.2 Preview 3 introduced the ability for developers to debug projects from Visual Studio or Visual Studio Code rather than browser-based development tools.

However, in announcing Preview 4 today (April 16), Daniel Roth, principal program manager, ASP.NET, called out some work that still needs to be done.

"Thank you everyone who has been trying out the new Blazor WebAssembly debugging support and sending us your feedback!" Roth said. "We've made some progress in this release, but there are still a number of limitations with the current debugging experience in Visual Studio and Visual Studio Code. The following debugging features are still not yet fully implemented:

  • Inspecting arrays
  • Hovering to inspect members
  • Step debugging into or out of managed code
  • Full support for inspecting value types
  • Breaking on unhandled exceptions
  • Hitting breakpoints during app startup

Those limitations are the latest problems encountered by the Blazor dev team on the client-side effort. Although the server-side component of Blazor -- which lets .NET-centric coders create web apps with C# instead of JavaScript -- shipped with .NET Core 3.0 last September, the client-side counterpart, Blazor WebAssembly, wasn't ready because of problems the team encountered with the new technology. Since then, the team has been playing catch-up, aiming for a production-ready release in May.

"We expect to continue to improve the debugging experience in future releases," Roth said today.

Other areas seem to be progressing better, and Roth listed highlights of the Preview 4 release, including:

  • Access host environment during startup: "The WebAssemblyHostBuilder now exposes IWebAssemblyHostEnvironment through the HostEnvironment property, which surfaces details about the app environment (Development, Staging, Production, etc.) during startup."
  • Logging improvements: "The WebAssemblyHostBuilder now exposes a Logging property of type ILoggingBuilder that can be used to configure logging for the app, similar to how you would configure Logging in an ASP.NET Core app on the server."
  • Brotli precompression: "When you publish a Blazor WebAssembly app, the published and linked output is now precompressed using Brotli at the highest level to further reduce the app size and remove the need for runtime compression. ASP.NET Core hosted apps seamlessly take advantage of these precompressed files."
  • Load assemblies and runtime in parallel: "Blazor WebAssembly apps now load the assemblies and runtime in parallel saving some precious milliseconds off the app load time."
  • Simplify .NET IL linker config for apps: "You can optionally provide a .NET IL linker config file for a Blazor WebAssembly app to customize the behavior of the linker. Previously, specifying a linker config file for your app would override the customizations built into Blazor that are necessary for apps to function property. App specific linker configuration is now treated as additive to the linker configuration provided by Blazor."
  • Localization support: "Blazor WebAssembly apps now support localization using .NET resource files (.resx) and satellite assemblies. Blazor WebAssembly apps set the current culture using the user's language preference. The appropriate satellite assemblies are then loaded from the server. Components can then be localized using the ASP.NET Core localization APIs, like IStringLocalizer<TResource> and friends. For more details on localizing Blazor WebAssembly apps, see Globalization and localization."
  • Documentation Via IntelliSense
    [Click on image for larger view.] Documentation Via IntelliSense (source: Microsoft).
  • API docs in IntelliSense: "The API docs for the various Blazor WebAssembly APIs are now available through IntelliSense."

Roth also invited developers to improve Blazor documentation, based on feedback from an in-product survey. Developers can further help the team improve the documentation by clicking a thumbs-up or thumbs-down icon asking if the documentation page was helpful. Developers can also use the feedback section at the bottom of each page to provide more information, or comment on the Improve the Blazor docs GitHub issue.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube