When debugging web sites that I'm working on, I tend to use Attach to Process rather than F5 to start debugging (since the site's already on in Firefox). However, occasionally when doing so, I'll get the following error:
EXECUTE permission denied on object 'sp_sdidebug', database 'master', owner 'dbo'.
I know this is caused by attaching the debugger for T-SQL, rather than just managed code (see this blog post for further explanation on that issue).
I'm hoping that it's possible to set somewhere to avoid attaching to T-SQL in the first place, rather than having to remember to go reset that setting each time I attach.
So, here's the real question: Does anyone know how I can change the default behavior of Visual Studio 2008, so that when attaching to a process through the debug menu, it does not automatically attach to T-SQL, but only to managed code? That is, how can Studio be set to remember not to attach to anything other than managed code?
FYI, if there are project-specific settings, I'm using a C# Web Application project.