Did you always need a query string value for debugging?
I've been doing my nut in trying to work out why Smidge was bundling my CSS/JS when debugging was turned on. I assumed debugging was turned on because I had set Umbraco:CMS:Hosting:Debug="true"as per the doc..
However when I checked the UmbracoContext it showed IsDebug == false. Which puzzled me. Looking deeper in to the code it appears that setting this config setting is not sufficient. You must also have a query value of umbdebug=true, umbdebugshowtrace=true or a cookie called UMB-DEBUG set to true. Has this always been the case? I don't recall running in to it before, and this is my first V9 site.
There was no issue with my config. However I expected this solely to flag IsDebugMode on, causing Smidge not to bundle for example. However this is not the case. You also need to add a query string (umbdebug) to trigger debug mode.
Did you always need a query string value for debugging?
I've been doing my nut in trying to work out why Smidge was bundling my CSS/JS when debugging was turned on. I assumed debugging was turned on because I had set
Umbraco:CMS:Hosting:Debug="true"
as per the doc..However when I checked the UmbracoContext it showed
IsDebug == false
. Which puzzled me. Looking deeper in to the code it appears that setting this config setting is not sufficient. You must also have a query value ofumbdebug=true
,umbdebugshowtrace=true
or a cookie calledUMB-DEBUG
set to true. Has this always been the case? I don't recall running in to it before, and this is my first V9 site.Hi David,
I'm not seeing this issue. What do you have in appsettings.Development.json file in the section Umbraco.Cms ? I have the following :
For production I have this in appsettings.json
Dave
There was no issue with my config. However I expected this solely to flag IsDebugMode on, causing Smidge not to bundle for example. However this is not the case. You also need to add a query string (umbdebug) to trigger debug mode.
Hi David,
Like I said. Smidge is not bundling for me. I don't need to use the querystring.
How are using smidge to bundle. Do you create bundles using the runtimeminifier or are using the smidgehelper directly in your views ?
Dave
OK. I think I worked it out.
My confusion came from this code: https://github.com/umbraco/Umbraco-CMS/blob/9326cc5fc64a85e8e7fc19ae7faa726e33c33480/src/Umbraco.Web.Common/UmbracoContext/UmbracoContext.cs#L121
I'm calling:
as mentioned in the docs: https://our.umbraco.com/documentation/Fundamentals/Design/Stylesheets-Javascript/
However I don't think believe that this code accesses
IsDebug
orIsDebugMode
. Instead using IRuntimeMinifier should result in a correct debug status.is working on a reply...