Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

Break point can not be hit when any ResourceDictionary exceeds 8192 lines

Open yll690 opened this issue 1 year ago • 3 comments

Describe the bug

I have a WPF project, the Break point does not work after migrate to avalonia. Finally I found it is caused by a large xaml file, deleting it solves the problem. Further more, I found it occurrs when any ResourceDictionary's content exceeds 8192 lines

To Reproduce

Create a new avalonia desktop project Add a break point to MainWindow's constructor Run the project, the break point can be hit Add the Brushes.zip file to project (unzip first), no need to refrence it. Run the project, the break point can not be hit Delete any line of the brushes Run the project, the break point can be hit again

Expected behavior

The break point can be hit

Avalonia version

latest code, 11.1.3, 0.10.18

OS

Windows

Additional context

No response

yll690 avatar Aug 21 '24 02:08 yll690

I havn't test Styles, DataTemplates or Controls and don't know if this can occur to any xaml file. Currently the workaround is spliting the ResourceDictionary to two parts. Anyway, if it's necessary to have a limit, it would be better to produce a compile error.

yll690 avatar Aug 21 '24 03:08 yll690

I think maybe just no one ever had 8k+ likes of xaml tested until today 🫣

timunie avatar Aug 21 '24 04:08 timunie

😂Yes it's unusual. I have over a hundred DrawingImages in the ResourceDictionary. They are converted from svg and sometimes can be very long.

yll690 avatar Aug 21 '24 06:08 yll690