Allow debuggable Razor views
Microsoft's ASP.Net MVC allows users to set breakpoints in Razor views and debug them in Visual Studio. It would be splendid if ServiceStack could do the same
Thanks for Uri Hendler for pointing it out, this has now been enabled from this commit: https://github.com/ServiceStack/ServiceStack/commit/e2825b9655cda28910b65bb306e82ceeb3b7e36a
You’ll be able to debug Razor Views in DebugMode of by explicitly setting RazorFormat.IncludeDebugInfo = true;
Available from v4.0.45+ that’s now on MyGet:
Uri Hendler commented
As an interim solution, can you at least allow the in-memory class generated by the RazorPageHost to be compiled with debug information included (and without "/optimize" if necessary).
This would at least give a useful stack trace if an error occurs while rendering a razor template.
At present, it's very tedious and time consuming to find where the error came from.
CompilerParameters.IncludeDebugInformation can be enabled either by HostConfig DebugMode setting or by a new config setting on RazorFormat.