Been porting a lot of code lately and the support for runtime XAML debugging to get line numbers has been essential! Just add this to your .csproj or .vbproj file:

<XamlDebuggingInformation>true</XamlDebuggingInformation>

Thanks to Nick for the tip!