Skip to content

Library Configuration

Bozhidar Zashev edited this page Jun 12, 2025 · 6 revisions

When you add BlazorTrace in your Program.cs file you can specify various configuration options for it.

builder.Services.AddBlazorTrace(new WvBlazorTraceConfiguration()
{
	EnableTracing = true,
	EnableF1Shortcut = true,
});

These options are as follow:

property type default description
EnableTracing bool true By default the tracing is enabled, but from this property you can stop the tracing globally
EnableF1Shortcut bool true By default F1 will open the trace modal
TraceIncludeMethodList List new() Method name start strings that you want to always include in memory trace.
TraceExcludeMethodList List new(){"<>","get_","set_"} Method name start strings that you want to exclude from memory trace.
/// Some framework method are excluded by default. Set the <ExcludeDefaultMethods> to false if you need them |

| ExcludeDefaultMethods| bool | true | By default some framework methods are excluded for convenience. | | MemoryIncludeAssemblyList| List | new() | Assemblies name start strings that you want to always include in memory trace. | | MemoryExcludeAssemblyList| List | new(){"Microsoft.AspNetCore"} | Assemblies name start strings that you want to exclude from memory trace. Some framework assemblies are excluded by default. Set the to false if you need them | | ExcludeDefaultAssemblies| bool | true | By default some framework assemblies are excluded for convenience. | | MemoryIncludeFieldNameList| List | new() | Field Names that are containing one of the strings in this list will be always included in the trace | | MemoryExcludeFieldNameList| List | new(){"k__BackingField"} | Field Names that are containing one of the strings in this list will be excluded from the trace. Some field names are excluded by default. Set the to false if you need them | | ExcludeDefaultFieldNames | bool | true | By default some field names that are excluded for convenience. | | DefaultTraceMethodOptions | WvTraceMethodOptions? | null | Override the default Trace method options | | DefaultTraceSignalOptions | WvTraceSignalOptions? | null | Override the default Trace signal options |

Clone this wiki locally