Sample Code: http://blogs.code-counsel.net/Wouter/Downloads/Dashboard Manager - Source.zip
Installable Feature: http://blogs.code-counsel.net/Wouter/Downloads/Dashboard Manager - WSP.zip
One feature every developer loves, or will love, is the Developer Dashboard. It's obvious right? Earlier SharePoint developers were in the dark as to what is causing slow pages and now you can gain valuable insights out of the tracing information provided in the dash.
To enable the Developer Dashboard you can write a bit of code:
SPDeveloperDashboardSettings settings = SPWebService.ContentService.DeveloperDashboardSettings;
settings.DisplayLevel = SPDeveloperDashboardLevel.On;
You do this either in a console app (hella-lame), in PowerShell (semi-lame and a bit ITPro-ish), or….
You create a feature of course!
Find the Developer Dashboard Manager feature attached. First it adds some navigation items to Central Admin under both the landing page and the System Settings page.
The navigation leads to a page where you can manage the enabled state of the Developer Dashboard.
Hope it helps! Personally I use this feature as a quick overview of the new Visual Studio 2010 tools.