Enable Developer Dashboard in SharePoint 2010/2013/2016/2019

This tutorial, we will discuss SharePoint developer dashboard. We will see how to enable developer dashboard in SharePoint 2010, SharePoint 2013, SharePoint 2016 and SharePoint 2019.

SharePoint 2010 introduced the developer dashboard to check bugs in the browser itself.

SharePoint developer dashboard

Developer Dashboard is a new feature in SharePoint which helps us find useful information regarding the performance of a SharePoint site. The SharePoint Developer Dashboard is a user interface component built into SharePoint Foundation that displays diagnostic information that can be useful to developers and to farm administrators in diagnosing problems with the farm.

The Developer Dashboard in SharePoint is used to show performance and tracing information for a SharePoint page in control on the page itself. By default the Developer Dashboard is disabled. We can enable it by using Windows PowerShell.

Run the below Script to enable Developer Dashboard in SharePoint. There are also different ways to enable the developer dashboard in SharePoint.

This gives us information about execution time, log correlation ID, critical events, database queries, service calls, SPRequests allocation and webpart events offsets etc.

Enable SharePoint Developer Dashboard

There are several ways to enable developer dashboard in SharePoint 2010/2013/2016. I always prefer the PowerShell method, but for the sake of completeness, I will show several options here. We will see how we can enable the developer dashboard using PowerShell, using the object model and using stsadm.

Notice that there are the following options for the Developer Dashboard in SharePoint:

On
SharePoint 2010: The Developer Dashboard will always be rendered at the bottom of each page
SharePoint 2013/2016: The Developer Dashboard icon will always be displayed at the top right corner. It will not be appended to each page.

Off
SharePoint 2010 & 2013: The Developer Dashboard will not be available in SharePoint.

OnDemand
SharePoint 2010: The Developer Dashboard will only be appended to a page after clicking on the icon in the ribbon

SharePoint 2013: This mode is not available in SharePoint 2013 since it reflects the behavior of On now

There are different ways we can enable or disable the developer dashboard in SharePoint 2010/2013/2016.

Enable Developer Dashboard using PowerShell in SharePoint

Below is the PowerShell command to enable the developer dashboard in SharePoint 2010/2013/2016.

$devdashboard =[Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
$devdashboard.DisplayLevel = ‘OnDemand’;
$devdashboard.Update()
Write-Host ("Developer Dashboard Level: " + $contentService.DeveloperDashboardSettings.DisplayLevel)

Enable Developer Dashboard using Object Model in SharePoint

We can also SharePoint server object model code to enable the developer dashboard in SharePoint.

SPWebService service = SPWebService.ContentService;
service.DeveloperDashboardSettings.DisplayLevel=Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel.OnDemand;
service.Update();

Enable Developer Dashboard Using STSADM in SharePoint

We can also use the STSADM command to enable the developer dashboard in SharePoint.

STSADM.exe -o setproperty -pn
developer-dashboard -pv OnDemand

Enable developer dashboard SharePoint using STSADM

By using STSADM commands we can easily enable or disable developer dashboard in SharePoint.

Enable Developer Dashboard SharePoint:

stsadm -o setproperty -pn developer-dashboard -pv on

Disable Developer Dashboard SharePoint:

stsadm -o setproperty -pn developer-dashboard -pv off

Enable on Demand (Recommended approach):

stsadm -o setproperty -pn developer-dashboard -pv OnDemand

Enable developer dashboard SharePoint 2016/2013 PowerShell

By using PowerShell script, we can also easily enable or disable developer dashboard in SharePoint.

Enable Developer Dashboard SharePoint:

$var = Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
 $var.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
 $var.Update()

Enable on Demand:

$var = Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
 $var.DisplayLevel = ‘OnDemand’;
 $var.TraceEnabled = $true;
 $var.Update()

Disable Developer Dashboard SharePoint:

$var = Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
 $var.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
 $var.Update()

You may like following SharePoint PowerShell tutorials:

The Developer Dashboard can be disabled by setting the display level value to “Off”. As needed the display level can be set to “On”, “Off” or “OnDemand” in the above code snippets. This operation requires a farm administrator permission. Make sure you have farm admin access before enabling/disabling developer dashboard.

>