Visual Studio has insufficient privileges to debug this process. To debug this process, Visual Studio must be run as an administrator

debuggingvisual-studio-2008windows-services

I have developed a windows service and this is service is running on my local computer under my account. When I try to debug this service by attaching this as a process in visual studio 2008 I get “Unable to attach to the process. Visual Studio has insufficient privileges to debug this process. To debug this process, Visual Studio must be run as an administrator.”
I have logged in to my system as administrator and so when VS 2008 is launched it is running as administrator not sure why I get this error. I am using Windows XP Pro sp3

Best Answer

If you're using Windows XP, the local security policy of the PC may be restricting non-administrators from running debuggers. By default, only administrators can debug.

Administrative tools -> Local Security Policy -> Local Policies -> User Rights Assignment -> "Debug programs"

Related Topic