Wednesday, August 3, 2011

SharePoint 2010 Turn on Developer Dashboard

One of the new feature in SharePoint 2010 is Developer dashboard. With help of Developer Dashboard we can get view of SharePoint enviroment and find out issues if occuring. This Provides us info about Call Stacks, Web Server, Critical Events, Database Queries, Service Calls, SP Requests, and Webpart Events. This even shows the time being taken to execute any code.

Under Database Calls this will even provide us the hyperlinks. We can click on the link and it will show us a dialog and we can see the SQL commands being Called.




Mode of developer dashboard:
On – creates everytime the output at the end of the page content
Off – switch off developer dashboard and nothing is rendered
OnDemand – creates a DeveloperDashboard icon to make dashboard output visible as needed

How to turn on Developer Dashboard?
Open Sharepoint 2010 Management Shell and type the following commands:

##Turn on
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService 
$dashboard = $contentService.DeveloperDashboardSettings
$dashboard.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
$dashboard.Update()

##Turn on Demand Mode
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dashboard = $contentService.DeveloperDashboardSettings
$dashboard.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$dashboard.Update()

##Turn Off
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dashboard = $contentService.DeveloperDashboardSettings
$dashboard.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::Off
$dashboard.Update()

##Turn On demand using stsadm
stsadm -o setproperty -pn developer-dashboard -pv ondemand

2 comments:

Popular Posts