Developer Dashboard in SharePoint 2010/2013/2016

This SharePoint tutorial we will discuss what is a developer dashboard in SharePoint 2010/2013/2016 and how we can enable developer dashboard in SharePoint server 2016/2013/2010 using PowerShell, Server Object Model, etc.

What is developer dashboard in SharePoint?

Developer Dashboard is a new feature in SharePoint 2010 which helps us find useful information regarding the performance of a SharePoint site. The 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 use 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 the Developer Dashboard. There are also different ways to enable the developer dashboard.

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

Enable Developer Dashboard In SharePoint Server 2016/2013/2010

By default, the Developer Dashboard is in disable mode, but there are different ways to enable developer dashboard by using PowerShell, STSADM or by using the Server object model code.

Below are different ways to enable developer dashboard:

Enable developer dashboard SharePoint 2016/2013 Server Object Model

By using SharePoint object model, we can enable or disable developer dashboard in SharePoint.

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

SPDeveloperDashboardSettings settings = SPWebService.ContentService.DeveloperDashboardSettings;
settings.DisplayLevel = SPDeveloperDashboardLevel.On;
settings.TraceEnabled = true;
settings.Update();

Enable developer dashboard SharePoint 2010 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()

After this you can see the developer dashboard will appear like below:

enable developer dashboard sharepoint 2016 powershell
enable developer dashboard sharepoint 2016 powershell

How to make Developer Dashboard appear in custom master page in SharePoint?

Now, we will discuss how to appear developer dashboard in the custom master page in SharePoint 2010.

The 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.

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

By default, Developer Dashboard appears on any page that uses the SharePoint Foundation 2010 master page or any page using a custom master page where the Dashboard control is included.

If you want to use developer dashboard on custom master pages, then we need to include the Developer Dashboard Launcher and the page rendering control that renders the output to the page.

We can put the Developer Dashboard Launcher on the master page in SharePoint 2010.

<Sharepoint:DeveloperDashboardLauncher
ID="DeveloperDashboardLauncher"
NavigateUrl="javascript:ToggleDeveloperDashboard()"
runat="server"
ImageUrl="/_layouts/images/fgimg.png"
Text="<%$Resources:wss,multipages_launchdevdashalt_text%>"
OffsetX=0
OffsetY=222
Height=16
Width=16 />

And we can put the Page Rendering Control where we want this to appear and this will render the output to the page.

<SharePoint:DeveloperDashboard runat="server" />

This is how we can make developer dashboard appear in custom master page in SharePoint 2010.

You may like following SharePoint server object model tutorials:

Hope this SharePoint tutorial helps to learn what is SharePoint developer dashboard and how we can enable developer dashboard using PowerShell, STSADM or by using the SharePoint server object model code.

Donwload Hub site pdf

Download SharePoint Online Tutorial PDF FREE!

Get update on Webinars, video tutorials, training courses etc.

Bijay Kumar

I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site SPGuides.com

>