The Developer Dashboard has undergone some significant changes in 2013. E.g. it is now running in a separate browser window and also allows to show ULS log entries related to the current request.
The following article gives a brief overview of the new functionality:
Two steps are necessary to achieve this:
- The custom script file(s) have to be registered to be loaded into the Developer Dashboard page.
Below is a short example, which hides the ULS tab in the Developer Dashboard. This example also shows how to use jquery within the Developer Dashboard.
Create the custom logic in a script file
Create a "hideULSTab.js" inside the layouts/15 directory (program files\common files\microsoft shared\web server extensions\15\template\layouts) and add the following script code to it:
// register a code block that runs after the page is loaded
// iterate over all tabs (identified by CSS class "ms-dd-Tab")
// look for the tab which has "ULS" title
if ($(para).text().indexOf("ULS") !== -1)
// hide the title
Register the script files with the Developer Dashboard
Our custom script code requires the jquery library – so we have to register two script files with the developer dashboard. That can be done using the following powershell commands:
$contentSvc = ([Microsoft.SharePoint.Administration.SPWebService]::ContentService)
$DevDashboardSettings = $contentSvc.DeveloperDashboardSettings
$DevDashboardSettings.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
As you can see we are registering two different script files: first the jquery library from an external site and second the script file we created earlier.
The powershell script will also enable the Developer Dashboard by setting the DisplayLevel to On.