WebVella.BlazorTrace 1.0.7

dotnet add package WebVella.BlazorTrace --version 1.0.7
                    
NuGet\Install-Package WebVella.BlazorTrace -Version 1.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WebVella.BlazorTrace" Version="1.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WebVella.BlazorTrace" Version="1.0.7" />
                    
Directory.Packages.props
<PackageReference Include="WebVella.BlazorTrace" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WebVella.BlazorTrace --version 1.0.7
                    
#r "nuget: WebVella.BlazorTrace, 1.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=WebVella.BlazorTrace&version=1.0.7
                    
Install WebVella.BlazorTrace as a Cake Addin
#tool nuget:?package=WebVella.BlazorTrace&version=1.0.7
                    
Install WebVella.BlazorTrace as a Cake Tool

Documentation Dotnet GitHub Repo stars Nuget version Nuget download MIT License

What is BlazorTrace?

An easy to add library that will enable you to get detailed information about your Blazor components rerenders and memory, as well as compare it with different snapshots that you created. It is targeting Blazor UI developers and presents the information in a simple and focused way. BlazorTrace will help you build better, faster and more consistent user experience with your Blazor applications.

About Us

We are a small team of early Blazor adopters that created several complex Blazor applications that work in production. We prefer working with WebAssembly deployments but SSR is getting a favorite fast. We have 15+ experience in creating .net projects. Here is some examples of our work

WebVella ERP GitHub Repo stars Nuget download
Document Templates Library GitHub Repo stars Nuget download
Tefter GitHub Repo stars Nuget download

How to get it

You can either clone this repository or get the Nuget package

Please help by giving a star

GitHub stars guide developers toward great tools. If you find this project valuable, please give it a star – it helps the community and takes just a second!⭐

Documentation

You can find our documentation in the Wiki section of this repository

Get Started

To start using BlazorTrace you need to do the following simple steps:

  1. Add the latest version of the WebVella.BlazorTrace Nuget package to your component holding project
  2. Add the latest version of the MethodDecorator.Fody Nuget package to your component holding project
  3. Add the following lines in your Program.cs file. You can get more info about options to fine tune it in the wiki.
[module: WvBlazorTrace] //<-- This is important to be before the namespace declaration
namespace Your.Name.Space;

//code...

builder.Services.AddBlazorTrace();

#if DEBUG
//Snapshots require bigger hub message size
builder.Services.Configure<HubOptions>(options =>
{
options.MaximumReceiveMessageSize = 10 * 1024 * 1024; // 10MB
});
//To get the message size error if it got bigger than the above
builder.Services.AddSignalR(o =>
{
 o.EnableDetailedErrors = true;
});
#endif

//code...

  1. Add FodyWeavers.xml file at the root of your component poject with the following content
<?xml version="1.0" encoding="utf-8"?>
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
	<MethodDecorator AsyncMethods="true" />
</Weavers>
  1. Add the BlazorTrace component at the end of your App.razor or Routes.razor component
<Router AppAssembly="@typeof(App).Assembly">
    <Found Context="routeData">
        <RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
    </Found>
</Router>
<WvBlazorTrace/> @* <-- INSERT HERE *@
  1. (BASIC) Add tracers in your components or methods. Decorate a method or a component class with the attribute [WvBlazorTrace]
// if razor component without code behind
@attribute [WvBlazorTrace]
// if razor.cs code behind you can decorate the entire class
[WvBlazorTrace]
public partial class Test1 : ComponentBase
{
	//code...
}
// if razor.cs code behind you can decorate only several methods you need traced
public partial class Test1 : ComponentBase
{

	[WvBlazorTrace]
	private void _countTest1(){}

}
  1. (ADVANCED) Add tracers with options that can be dynamically set. For all options, visit our wiki.
	[Inject] public IWvBlazorTraceService WvBlazorTraceService { get; set; } = default!;
	[Parameter] public string? InstanceTag { get; set; }

	protected override void OnInitialized()
	{
		WvBlazorTraceService.OnEnter(component: this, instanceTag: InstanceTag);
		base.OnInitialized();
		//Do something
		WvBlazorTraceService.OnExit(component: this, instanceTag: InstanceTag);
	}
  1. Add signals in your methods. They are a way to track events in your components or look in details about what and how is going on. There are several arguments that you can call them with, but here is an example with the only required one (component):
	[Inject] public IWvBlazorTraceService WvBlazorTraceService { get; set; } = default!;
	private void _countTest()
	{
		_counter++;
		WvBlazorTraceService.OnSignal(caller: this, signalName: "counter");
	}
  1. Thats it. You can start reviewing the data. PRO TIP: Use the F1 (show) and Esc (hide) to save time.

Method OnEnter/OnExit call information

BlazorTrace modal

Log signals information

BlazorTrace modal

Trace calls detail information

BlazorTrace modal

Memory detail information

BlazorTrace modal

Limit hits

BlazorTrace modal

Snapshots

BlazorTrace modal

Muted traces

BlazorTrace modal

License

BlazorTrace is distributed under the MIT license.

Acknowledgments

BlazorTrace wouldn't be possible without the incredible encouragement and support of amazing people and communities. Thanks to all of you!

jhsheets

For being our fist contributor and thus boosting our motivation to make BlazorTrace better.

LlamaNL

He saved time to all of us, by finding a way how to create faster tracer intergation with an Attribute and FODY

Tension-Maleficent

For helping with the FODY implementation

/r/dotnet, /r/Blazor, /r/csharp

These Reddit communities are home to incredibly welcoming and knowledgeable people, always ready to offer help with questions, problems, or advice.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.7 215 6/12/2025
1.0.6 136 6/4/2025
1.0.5 121 6/4/2025
1.0.4 116 6/4/2025
1.0.2 167 5/29/2025
1.0.1 123 5/29/2025
1.0.0 130 5/29/2025

Initial release