Why doesn't mini profiler work?
# help-with-umbraco
t
Hi I installed a brand new Umbraco 13 and enabled profiling under the profiling tab. Created a basic document type and ran the site. The page displayed and I entered ?umbdebug=true at the end of the URL but nothing is being displayed. I'm expecting some pop up on the right but nothing is shown. I have not installed anything else but was expecting to see a pop up. I also have Hosting, debug= true in my app settings. Have I missed off anything?
u
I just launched a v12.3.3 site as a reminder to myself and the miniprofiler displayed ok (on a plain site with the Clean Starter kit installed). When you turn on the automatic profiling you don't need to add the querystring. Is your debug setting under Umbraco, CMS? I remember an issue I had in the past when (for reasons I can't remember) I wasn't inheriting from UmbracoViewPage in my page template.
I just ran a test with 13.1.1 and without a proper html page structure the miniprofiler doesn't appear, but with at least a minimal html page structure the miniprofiler does appear as expected.
m
https://docs.umbraco.com/umbraco-cms/fundamentals/code/debugging#displaying-the-miniprofiler mentions
Also, ensure your template calls @Html.RenderProfiler() as one of the last things.
? might help?
Also might need to be in debug mode.. from this core code..
Copy code
csharp
public bool IsDebug => // NOTE: the request can be null during app startup!
        _hostingEnvironment.IsDebugMode
        && (string.IsNullOrEmpty(_httpContextAccessor.HttpContext?.GetRequestValue("umbdebugshowtrace")) == false
            || string.IsNullOrEmpty(_httpContextAccessor.HttpContext?.GetRequestValue("umbdebug")) == false
            || string.IsNullOrEmpty(_cookieManager.GetCookieValue("UMB-DEBUG")) == false);
w
Does MiniProfiler only work for front-end requests? I'm trying to debug custom backoffice code but I can't get MiniProfiler UI to display anywhere.
j
Yes, miniprofiler only runs for "frontend" requests, i.e. where there's a view calling
@Html.RenderProfiler()
. The BackOffice is all JS and .NET APIs, if you need to do profiling in the Backoffice then you'll want to to profile your APIs and JavaScript directly.
100 Views