How to enable disable SharePoint Developer Dashboard for tracing troubleshooting

Posted on : Fri, 18th Sep 15 07:50 am (Updated on : Fri, 18th Sep 15 07:50 am) UTC
Author : Code2care
100+ votes

SharePoint - Developer Dashboard

The Developer Dashboard is available with SharePoint 2010 and SharePoint 2013 which provides tracing information to the developers and administrators for debugging and troubleshooting issues with page and its components, usually to check the rendering time.
Developers can identify what type of problem by looking at the traces found on the page itself. The performance issues and resource usage information is also available in Unified Logging Service (ULS) logs but understanding the raw data takes time and is not easy. But Developer Dashboard information is correlated making identifying issues much easier.

Information included

  1. Thread execution time
  2. Number, duration, call stack information and query text of each SQL Server query generated by the page
  3. Number, duration, and call stack information of each WCF call
  4. URL or timer job name
  5. Current user
  6. Execution start time
  7. Any of the preceding statistics for code enclosed by SPMonitoredScope

Dashboard Modes

  1. On - Dashboard is viewable on all pages that use the default master page
  2. OnDemand - Dashboard icon is displayed on the top right side of the page allowing users to toggle the Dashboard on and off

How to enable-disable Dashboard

The Developer Dashboard is always Off by default.
There are multiple ways to enable it - STSADM, Windows PowerShell, SharePoint Object Model.

STSADM - Enable/Disable Developer Dashboard
[ON MODE]       stsadm -o setproperty -pn developer-dashboard -pv on
[ONDEMAND MODE] stsadm -o setproperty -pn developer-dashboard -pv ondemand

[DISABLE]       stsadm -o setproperty -pn developer-dashboard -pv off

POWERSHELL - Enable/Disable Developer Dashboard
[ON MODE]       (Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = "On"
[ONDEMAND MODE] (Get-SPFarm).PerformanceMonitor.DeveloperDashboardLevel = "OnDemand"

SHAREPOINT CODE - Enable/Disable Developer Dashboard
SPPerformanceMonitor pm = SPFarm.Local.PerformanceMonitor;
pm.DeveloperDashboardLevel = SPPerformanceMonitoringLevel.On;

Code2care's mission is to share varied knowledge in technical and non-technical areas gathered during day-to-day learnings and development activities so that our visitors can leverage this portal to find solutions to their queries without re-inventing the wheel. Technical posts include Learnings, Tutorials, Video Tutorials, Code Snippets, Tips-n-tricks.

Follow us : Facebook - Twitter - Google +