Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/FlowLedger.AppHost/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,17 @@ static IResourceBuilder<T> WithMxConfig<T>(

WithMxConfig(worker, builder.Configuration);

// Force unoptimized JIT on debugged service processes so the Rider/Aspire debugger can read locals.
// Without this the CLR runs ReadyToRun/tiered code and throws CORDBG_E_IL_VAR_NOT_AVAILABLE (0x80131304).
// IsRunMode is true only for local run/debug — never during publish or CI.
if (builder.ExecutionContext.IsRunMode)
{
foreach (var svc in new[] { api, web, worker })
{
svc.WithEnvironment("DOTNET_TieredCompilation", "0")
.WithEnvironment("DOTNET_ReadyToRun", "0")
.WithEnvironment("DOTNET_TieredPGO", "0");
}
}

builder.Build().Run();
Loading