Preparing for a user interface debug session
To prepare for a user interface debug session, modify a System.config file and set breakpoints in JavaScript source files.
Procedure
- Access the folder %TRIDION_HOME%\web\WebUI\WebRoot\Configuration\ and open the file System.config for editing.
- Find the following element:
<filter for="Style" type="Tridion.Web.UI.Resources.Filters.JScriptMinifier, Tridion.Web.UI.Resources.Filters" enabled="always">and set the value of
enabledtonever.This makes JavaScript messages easier to read. - Find the following element:
<filter for="Style" type="Tridion.Web.UI.Core.Configuration.Resources.Filtering.CssCompressorFilter, Tridion.Web.UI.Core" enabled="always">and set the value of
enabledtonever.This makes your CSS easier to read. - Find the following element:
<cache httpexpireduration="P10Y0M0DT0H0M0S">and set the value of
httpexpiredurationtoP0Y0M0DT0H0M10S.This reduces browser cache duration of GUI elements. - Find the
serverelement with aversionandmodificationattribute, and increase the number value ofmodificationby one. - Save and close System.config.
- Set a breakpoint in one of the following ways:
If you are the only user using this system, you can insert breakpoints anywhere in a JavaScript (.js) file by adding the following line where you want the browser to break:
debuggerAlternatively, load the webpage that is causing a problem in your browser, open your browser's developer tools by pressing F12, and in the Script tab (Sources tab in Chrome), select and examine the Javascript file in which you want to set a breakpoint. Do so by clicking the line number next to the line on which you want to set your breakpoint.
- Go to the browser you will use for the debugging session and clear the browser cache.
- If you are using Microsoft EdgeMicrosoft Edge, you need to disable the following option in your internet settings: Disable script debugging (Internet Explorer). This option is enabled by default.
- Open the browser's developer tools and proceed with a debugging session.