If you’re like me and like to have the SQL tools on your SharePoint 2010 boxes in demo/dev/test environments (we’d never do it in production, right?) then you’ll suffer from time to time with the SQL Server Management Studio (SSMS) JIT debugger flaring it’s nostrils everytime you recycle the Timer service.

Frikken’ annoying.

If you have full Visual Studio you can disable this via Tools > Options > Debugging > etc. but with SSMS, not so much. Fortunately, the debugger is defined within some registry keys which, through the gift of PowerShell, we can throw away with glee.

Open an elevated prompt and throw down:

Remove-ItemProperty -path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug" -name Debugger Remove-ItemProperty -path HKLM:\SOFTWARE\Microsoft\.NETFramework -name DbgManagedDebugger Remove-ItemProperty -path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug" -name Debugger Remove-ItemProperty -path HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NETFramework -name DbgManagedDebugger

Clearly there is no error handling here, perhaps you should add some?

I’ve always meant to post this tip here as I’m constantly looking up this script in my library and having it here makes it nicely GoogleBingable.

Usual caveats and warnings apply!

more to follow…