有两种方法,如下:
1. STSADM
C:\> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm -o setproperty -pn developer-dashboard -pv on
C:\> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm -o setproperty -pn developer-dashboard -pv off
C:\> C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm -o setproperty -pn developer-dashboard -pv OnDemand
推荐使用OnDemand模式,因为此模式下将有一个图标显示在页面右上角,从而可以动态切换开发者面板的显隐。
2. PowerShell
$svc=[Microsoft.SharePoint.Administration.SPWebService]::ContentService
$ddsetting=$svc.DeveloperDashboardSettings
$ddsetting.DisplayLevel=[Microsoft.SharePoint.Administration.SPDeveloperDashboardLevel]::OnDemand
$ddsetting.Update()
参考:
http://sptwentyten.wordpress.com/2009/10/20/how-to-enable-the-developer-dashboard/
http://blogs.technet.com/b/wbaer/archive/2009/11/21/welcome-to-the-developer-dashboard.aspx