feat(logging): runtime Debug-build detection via DebuggableAttribute

This commit is contained in:
mika kuns
2026-06-04 19:09:49 +02:00
parent b3b87df320
commit ab260ad0a6
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
using System.Diagnostics;
using System.Reflection;
using ClaudeDo.Logging;
namespace ClaudeDo.Worker.Tests.Logging;
public sealed class BuildConfigTests
{
[Fact]
public void IsDebug_MatchesEntryAssemblyDebuggableAttribute()
{
var entry = Assembly.GetEntryAssembly();
var expected = entry?
.GetCustomAttribute<DebuggableAttribute>()
?.IsJITOptimizerDisabled ?? false;
Assert.Equal(expected, BuildConfig.IsDebug);
}
}