diff --git a/ILSpy/ILSpy.csproj b/ILSpy/ILSpy.csproj index 7a5469372..c4b2dc0e9 100644 --- a/ILSpy/ILSpy.csproj +++ b/ILSpy/ILSpy.csproj @@ -67,6 +67,10 @@ + None All diff --git a/ILSpy/Program.cs b/ILSpy/Program.cs index 53c6e1f6a..47fdbcaa8 100644 --- a/ILSpy/Program.cs +++ b/ILSpy/Program.cs @@ -33,8 +33,17 @@ namespace ILSpy // Avalonia configuration, don't remove; also used by visual designer. public static AppBuilder BuildAvaloniaApp() - => AppBuilder.Configure() - .UsePlatformDetect() - .LogToTrace(); + { + var builder = AppBuilder.Configure() + .UsePlatformDetect(); +#if DEBUG + // Enables and attaches the Avalonia 12 DevTools bridge (it calls AttachDeveloperTools + // internally, so no separate App-level attach is needed -- a second call throws + // "already attached"). The avdt global tool connects over this bridge. Gated on DEBUG + // because the DiagnosticsSupport assets are excluded from Release. + builder = builder.WithDeveloperTools(); +#endif + return builder.LogToTrace(); + } } } \ No newline at end of file