Inside SharePoint 2010 (2): Enabling the SharePoint 2010 Developer Dashboard

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            SPDeveloperDashboardSettings settings = SPWebService.ContentService.DeveloperDashboardSettings;
            settings.DisplayLevel = SPDeveloperDashboardLevel.On;
            settings.TraceEnabled = true;
            settings.Update();
            Console.WriteLine("Finished...");
            Console.ReadLine();
        }
    }
}
原文地址:https://www.cnblogs.com/thlzhf/p/2767281.html