SharePoint 2013 : Enable developer Dashboard

Introduction :
 
Developer Dashboard is one of the great feature available on SharePoint 2013. Often used by SharePoint administrators, disabled by default, provides performance and tracing information.
 
Enabling this feature will help you get critical information about execution time, log correlation ID, critical events, database queries, service calls, SPRequests allocation and webpart events offsets.
 
There are following options available for Developer Dashboard : 
   1.   On
   2.   Off
   3.   OnDemand (Not available in SharePoint 2013; but was there in SharePoint 2010) 
 
Various Ways to Activate Developer Dashboard : 
 
   1.   PowerShell              
  1. $devDashBoard = [Microsoft.SharePoint.Administration.SPWebService]::ContentService.DeveloperDashboardSettings  
  2. $devDashBoard.DisplayLevel = 'On'  
  3. $devDashBoard.TraceEnabled = $true  
  4. $devDashBoard.Update()  
   2.   STSADM        
  1. stsadm -o setproperty -pn developer-dashboard -pv On  
   3. SharePoint Object Model        
  1. using Microsoft.SharePoint.Administration;  
  2.   
  3. SPWebService oSPWebService = SPContext.Current.Site.WebApplication.WebService;   
  4. oSPWebService.DeveloperDashboardSettings.DisplayLevel =   
  5.     SPDeveloperDashboardLevel.On;   
  6. oSPWebService.DeveloperDashboardSettings.Update();  
 Upon successful activation of Developer Dashboard; you will find an icon in top right corner of SharePoint Site. As shown in below image.
 
 
 
Of course to revert back the settings again replace 'on' parameter with 'off' .
  
Happy SharePointing !!!!