I was working on a public SharePoint site and i wanted to enabled the developer dashboard utility. I Ran the following powershell command to enable the developer dashboard:
Turn On Developer Dashboard Powershell Command:
$content = ([Microsoft.SharePoint.Administration.SPWebService]::ContentService)
$appsetting.DisplayLevel = [Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::On
**If you want to turn it off, just change the On flag to Off and you are good.
After that, I was able to see the developer dashboard icon in the Central Administration site but not on my public SharePoint site.
So basically, I found that you have to grant permissions for anonymous users to access this utility since it is not accessible for anonymous users even if the utility is enabled.
How to enable Developer Dashboard for anonymous users:
$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$dashboardSettings = $contentService.DeveloperDashboardSettings
$dashboardSettings.RequiredPermissions = [Microsoft.SharePoint.SPBasePermissions]::EmptyMask
By default, the required permissions property for the developer dashboard utility is “AddAndCustomizePages” which is available for authenticated users who have this permission, so you need to changed it to no permissions by setting the value to EmptyMask which means in SharePoint permissions world no permissions are needed.
Note: This is a good technique while you are developing, testing and in the user acceptance test phase of any SharePoint implementation project. when you don’t need this utility it is strongly recommended to turn it off on production environment.
Hope this helps!
1) SharePoint base permissions: