Wednesday, April 6, 2011

How to Enable the Developer Dashboard in SharePoint 2010

When activated, the Developer Dashboard appears at the bottom of a page and allows site owners and up to view the call stack, database query times, exception information in error messages, and loading events for web parts during page rendering. All of these allow you to pinpoint the bottleneck within your page and to quickly focus on the resolution. The Developer Dashboard can be enabled via STSADM or PowerShell. This is one of the rare cases where the command in STSADM is shorter than PowerShell. The recommended property value is OnDemand, which provides you the ability to toggle the dashboard on and off.
STSADM
  • stsadm -o setproperty -pn developer-dashboard -pv on
  • stsadm -o setproperty -pn developer-dashboard -pv off
  • stsadm -o setproperty -pn developer-dashboard -pv OnDemand (recommended)
Powershell Script for the Same

$svc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService
$ddsetting=$svc.DeveloperDashboardSettings
$ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$ddsetting.Update()

1 comment: