Thursday, December 10, 2009

Activating the SharePoint 2010 Developer Dashboard

The Developer Dashboard is a great feature for developers in SharePoint 2010 which enables us to troubleshoot and debug SharePoint pages – take a look at Using the Developer Dashboard in SharePoint 2010 for some great info.

So you can activate the Developer Dashboard in 3 ways:

  • Using stsadm: stsadm -o setproperty -pn developer-dashboard -pv On or stsadm –o setproperty –pn developerdashboard -pv  OnDemand. You should probably use the OnDemand mode which will add a VERY LITTLE icon in the top right corner of your pages where you can switch the Developer Dashboard on and off



  • Using Powershell
  • $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
    if ($snapin -eq $null)
    {
        Write-Host "Loading Microsoft SharePoint Powershell Snapin"
        Add-PSSnapin "Microsoft.SharePoint.Powershell"
    }
    $dash = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings;
    $dash.DisplayLevel = 'OnDemand';
    $dash.TraceEnabled = $true;
    $dash.Update()

  • Using the SharePoint Object Model

SPWebService.ContentService.DeveloperDashboardSettings.DisplayLevel = SPDeveloperDashboardLevel.Off;
       SPWebService.ContentService.DeveloperDashboardSettings.Update();

1 comment:

Unknown said...

Thanks.
I have written my own views here on it.
http://praveenbattula.blogspot.com/2010/05/developer-dashboard-in-sharepoint-2010.html

thanks again.