Skip to content

Debugging the XAML compiler

Steven Kirk edited this page Apr 12, 2024 · 5 revisions

You can debug the XAML compiler by setting the AvaloniaXamlIlDebuggerLaunch MSBuild property to true. When this property is set to true on a project then the XAML compiler will call Debugger.Launch in order to allow a debugger to be attached.

If you're debugging Sandbox in the Avalonia repo, you can simply uncomment this line:

https://github.com/AvaloniaUI/Avalonia/blob/cfc0f158b3b96bcbaa250cdc9446251df87e944c/samples/Sandbox/Sandbox.csproj#L8