Ben  McKernan
Optimizely
Aug 15, 2014
visibility 21239
star star star star star star
(7 votes)

How to debug Episerver UI code

TL;DR
To run your site with uncompressed JavaScript in edit mode add <clientResources debug="true" /> to your web.config inside the episerver.framework element.

 

JavaScript Debug Files Explained

A while back I posted a blog about using uncompressed JavaScript files for debugging EPiServer 7. I thought it would be worth highlighting how you can use uncompressed JavaScript in EPiServer 7.6 and onwards and how it works with the new continuous release cycle. I am happy to say it is even easier than before!

As of EPiServer 7.6 the CMS UI has been released via NuGet packages. These packages contain all the JavaScript files required to run the UI compressed into a zip file. The system then reads the contents of the zip file at run time. The great thing about this approach is that at initialization, if the client resources debug flag is set to true, the system will first look for a debug version of the JavaScript zip file and load that instead if it exists.

In order to have the system use the debug files you need to enable debug mode for client resources. You can do this simply by adding the <clientResources debug="true" /> element to your web.config inside the episerver.framework element. You can then toggle the debug files on and off by changing the value of the debug attribute from true to false.

EPiServer.CMS.UI.Sources (advanced topic)

This nuget package contains all original UI source files together with uncompressed dojo & dijit.

That source package is built as part of every release so it ties quite simply into the continuous release cycle. You can install it the same way you would any other NuGet package from nuget.episerver.com.

Install-Package EPiServer.CMS.UI.Sources

In case you ever need to manipulate sources files and then create a customized dojo build you can use that package. It comes together with all dojo build tools.

Please note that in order to debug the EPiServer edit mode you don't need that package. The config change described above is sufficient.

Aug 15, 2014

Comments

Henrik Fransas
Henrik Fransas Aug 15, 2014 08:14 PM

Nice, This is a great help when trying to built more advanced properties or debugging when something is wrong.

Great work!

Paul
Paul Aug 26, 2014 05:45 AM

Hi Ben, great article. In my case, I need to make and keep the changes to some of these files. What do you recommend as the best way to re-compress with my changes?

error Please login to comment.
Latest blogs
Hiring Your First AI Teammate: What Optimizely's Virtual Teammates Mean for the Marketing Org Chart

The coworker who never needs the brief twice How many times this week did you paste the same context into an AI tool? Brand voice, the target...

Leonardo Bravo | Dec 2, 2026

Upgrading to the new Optimizely brand UI: update CMS and Commerce Connect together

On October 27 , we released Optimizely CMS 13.5.0 with the new Optimizely brand UI: a new logo, colors, fonts and icons, and a redesigned login pag...

Bien Nguyen | Dec 1, 2026

Headless PaaS CMS 13 Masterclass, Part 3: Creating an empty CMS 13 project

Set up an empty Optimizely CMS 13 project with Opti ID and Optimizely Graph, plus a Next.js front end that reads its start page through the officia...

Michał Mitas | Dec 1, 2026 |

Optimizely Leads Both Axes in Gartner’s 2026 DXP Magic Quadrant

Gartner’s November 23, 2026 Magic Quadrant for Digital Experience Platforms places Optimizely highest on Ability to Execute and furthest right on...

Augusto Davalos | Dec 1, 2026

107,068 New CVE Records, 326 CISA KEV Additions: What to Patch First, and Four Calls for 2027

From January to November 2026 NVD published 107,068 CVE records, 2.5× the same months of 2025. CISA's catalog of known exploited vulnerabilities...

Piotr | Dec 1, 2026 |

A better broken links report for Optimizely CMS 13

In May I wrote about adding exclude patterns to the Link Validation job in CMS 11. That works, but every change to the patterns needs a deploy, and...

Per Nergård (MVP) | Nov 30, 2026