Practical Blazor Debugging Debugging Blazor WebAssembly Applications with Visual Studio and Blazor Server-Side Features

  • Peter Himschoot

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

You're watching a preview of subscription content. Log in to check access

This video shows how to improve Blazor’s debugging experience by structuring applications to be easily moved between server- and client-side deployments. Practices shown allow the full use of Visual Studio 2019’s debugging features even when the target deployment is WebAssembly on the client. You’ll learn how to develop and debug using Blazor’s server-side support using the extensive debugging support from Visual Studio, then how to move your fully debugged applications into WebAssembly on the client. You’ll be able to use the full debugging features of Visual Studio even when your deployment target is client side.

What You Will Learn

  • Debug Blazor applications, both server side and WebAssembly

  • Structure Blazor applications and build services for maximum reuse

  • Find and fix bugs faster using advanced breakpoints and watches

  • Use Blazor component libraries to build both server-side and WebAssembly applications

  • Develop and debug JavaScript Interup, again for maximum reuse

  • Gain insight into your code’s behavior through detailed logging

Who This Video Is For

Blazor developers who want to use Visual Studio’s debugger to get better insight into their application’s behavior. Also developers who want to overcome the weak debugging support for client-side Blazor development. Also programmers who want to build Blazor applications that support both server-side and WebAssembly deployments with maximum reuse.

This video shows how to improve Blazor’s debugging experience by structuring applications to be easily moved between server- and client-side deployments. Practices shown allow the full use of Visual Studio 2019’s debugging features even when the target deployment is WebAssembly on the client.

About The Author

Peter Himschoot

Peter Himschoot works as a lead trainer, architect, and strategist at U2U. Peter has a wide interest in software development that includes applications for the web, Windows, and mobile devices. Peter has trained thousands of developers, is a regular speaker at international conferences, and has been involved in many web and mobile development projects as a software architect.

 

Supporting material

View source code at GitHub.

About this video

Author(s)
Peter Himschoot
DOI
https://doi.org/10.1007/978-1-4842-6592-5
Online ISBN
978-1-4842-6592-5
Total duration
57 min
Publisher
Apress
Copyright information
© Peter Himschoot 2020

Related content

Video Transcript

[MUSIC PLAYING]

Have you been debugging Blazor WebAssembly recently and found the debugger not up to the task? Or did you have trouble reproducing that bug from production? Then watch this video, where I will show you how to set up your project so you can still use the full debugging capabilities of Visual Studio.

You will learn how to run your components both in Blazor WebAssembly and Blazor Server. Why? Because with Blazor Server, you can use all the features that Visual Studio debugging has to offer. I will also show you a whole bunch of debugging tips and tricks so you can become a master at debugging applications.

Topics we will cover are debugging with Blazor Server, debugging with Blazor WebAssembly, how to set up your project to use both Blazor Server and Blazor WebAssembly, so you can run with Blazor WebAssembly but debug with the Blazor Server. We’ll look at how we can fix bug faster with Advanced Breakpoints and Tracepoints, using the Watch and Immediate window to inspect and modify variables. We’ll look at how you can build services.

So we can easily debug them, but so we can also use the same service both in Blazor WebAssembly and Blazor Server. We’ll look at how we can customize the debugger’s behavior with attributes, find bugs in large loops with Hitcount breakpoints. And finally, we’ll also look at how we can do logging to reproduce some of those harder-to-find bugs.