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 Tutorial Contents
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.
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.
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)
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();
We can also use the STSADM command to enable the developer dashboard in SharePoint.
STSADM.exe -o setproperty -pn
developer-dashboard -pv OnDemand
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
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:
- PowerShell SharePoint Commands
- Delete content type from SharePoint list using PowerShell
- How to change SharePoint authentication from classic mode to claims based mode in SharePoint using PowerShell
- How to activate publishing feature in SharePoint 2013/2016 using PowerShell Script
- 3 Different ways to Change Site Collection URL in SharePoint 2013/2016 using PowerShell
- Bulk SharePoint Online Site Collection Creation using PowerShell
- Delete Hidden Web Application in SharePoint 2013 using PowerShell
- PowerShell Script to deploy WSP Solution in SharePoint 2013
- Change content type recursively using PowerShell SharePoint 2013
- Show hidden features in SharePoint 2013 using PowerShell
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.
I am Developer working on Microsoft Technologies for the past 6+years. I am very much passionate about programming and my core skills are SharePoint, ASP.NET & C#,Jquery,Javascript,REST. I am running this blog to share my experience & learning with the community I am an MCP, MCTS .NET & Sharepoint 2010, MCPD Sharepoint 2010, and MCSD HTML 5,Sharepoint 2013 Core
Solutions. I am currently working on Sharepoint 2010, MOSS 2007, Sharepoint 2013,Sharepoint 2013 App Dev, C#, ASP.NET, and SQL Server 2008.