Sunday, September 23, 2012

SharePoint Developer Dashboard - FAQs

This article is to answer some of the Frequently asked questions on SharePoint developer dashboard.

What is Developer Dashboard in SharePoint?
The developer dashboard is a new feature introduced in SharePoint 2010 to monitor and debug the performance on page by page basis. Remember the old days, when it was too difficult in MOSS 2007 on troubleshooting page delays? Developer dashboard is the answer to them!

What Information it gives to debug and troubleshoot?
Lot!
All operations and its start-end time, Controls and their load time, total execution time, current user, SPRequests, URL, Current page checkout level, current operations being performed,  Call Stacks, Web Server, Critical Events, Database Queries and their execution time, Service Calls, execution time, Events fired during the page rendering, Order of the page lifecycle and time during each stage, etc.

How to Activate SharePoint developer dashboard?
The dashboard is turned off by default. It can be enabled via:

  • Stsadm
  • PowerShell
  • Object model
There are three modes in developer dashboard:
  1. On - Turns On Developer Dashboard all time at the end of the page content.
  2. Off - switch off developer dashboard
  3. OnDemand - You will be able to show or hide the developer dashboard by clicking the image button next to your login name on the page. site collection administrator can toggle it ON or OFF.
Stsadm
stsadm -o setproperty -pn developer-dashboard -pv [mode]
E.g.
stsadm -o setproperty -pn developer-dashboard -pv ondemand

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

Object Model:
SPWebService contentService = SPWebService.ContentService;
contentService.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.On;
contentService.DeveloperDashboardSettings.Update();

How to I Launch Developer Dashboard?
once its turned ON every page will have the developer dashboard in its bottom. If its set to "OnDemand", developer dashboard can be launched by clicking the image button next to your login name on the page.
Trigger SharePoint Developer Dashboard OnDemand
 
How to Hide or Disable SharePoint Developer Dashboard?
Any of the above methods like stsadm can be used.
E.g.
stsadm –o setproperty –pn developer-dashboard –pv off

If its is set to on demand, site collection admins can turn it on or off.  When they do, it only turns it on or off for that particular site collection.  Also, only the person who turned it on sees the output.  Other users will not see the output.


How do I monitor my own function with developer dashboard?
Use: spmonitoredscope as
using (new SPMonitoredScope(“Your-Function-Name”))
{
  //Place your code inside
}

"Your-Function-Name" will appear in the developer dashboard!. BTW, SPMonitoredScope isn't accessible in the Sandbox solutions.

Does it available in SharePoint 2010 foundation?

Yes, developer dashboard is available in SharePoint 2010 Foundation as well.

Example of the Developer Dashboard:
SharePoint Developer Dashboard - FAQs

Enable Developer dashboard in SharePoint 2013

All of the above methods work for SharePoint 2013 also! SharePoint 2013 developer dashboard brings new features such as: ULS logs Tab, Opening in new window, MDS Tab, SPRequests tab to debug Object dispose bugs, View all requests, etc. Ondemand option is deprecated in SharePoint 2013.
 developer dashboard sharepoint 2013 enable

SharePoint 2013 developer dashboard relies on Usage and Health Data Collection Service Application. So, Create it first!
New-SPUsageApplication -Name "Health and Usage Application" -DatabaseName "SP2013_Health_and_Usage_Srv"

If you don't do it prior enabling: you will get developer dashboard in SharePoint 2013 empty!
 developer dashboard sharepoint 2013 empty

Feature based solution to Manage SharePoint developer dashboard in central administration
Wictor Wilén has created a Feature based solution to Turn ON/OFF Developer dashboard from Central Administration site.

What Permission we need to run SharePoint developer dashboard?
By default, You need "AddAndCustomizePages". But you can set the "RequiredPermissions" property to base permissions to override.

MSDN Link on Using the Developer Dashboard 



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

2 comments :

  1. It comes into save while problem solving performance issues of the SharePoint Page.

    ReplyDelete
  2. many important questions are answered here which creates many problems....
    Thanx for the solutions.

    ReplyDelete

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...