AFAIK is not possible to debug views this way (currently 3.9.43 is used, a later version, I believe it has a better diagnosis of compilation errors).
Try to keep the viewing code simple, limited to a simple loop / rendering, and use extension methods for DTO for any complex logic / processing, which allows you to debug. You can also consider using logging or a simple debug extension method:
using ServiceStack.Html; public static class HtmlHelperExtensions { public static bool IsDebug(this HtmlHelper htmlHelper) { #if DEBUG return true; #else return false; #endif } } @using ServiceStack.Text @inherits ServiceStack.Razor.ViewPage<ServiceStackRazorCrud.Api.UserPageResourceResponse> @{ var m = Model; } @if (this.Html.IsDebug()) { <div class="debug">@(this.Model == null ? "m == null" : Model.Dump())</div> }
Gavin faux
source share