VS2010 Win7上的服务调试 [英] Service Debug on VS2010 Win7
问题描述
大家好.
我已将软件从VS2005迁移到VS2010,从XP迁移到Win7,并且在调试Windows服务时,尝试附加到进程中时出现以下错误:
无法附加到进程.VisualStudio没有足够的特权来调试此进程.要调试此进程,必须以管理员身份运行Visual Studio."
因此,我以管理员身份运行它,我检查了VSLauncher.exe和devenv.exe的权限,使其始终以管理员身份运行,但仍然出现错误.
我已经是管理员了.有人有同样的问题吗?
顺便说一句,我正在使用W7和VS2010.
另外,右键单击并以以管理员身份运行"运行VS也没有区别.
Hi everybody.
I have migrated my software from VS2005 to VS2010, and XP to Win7, and when debugging my windows services, trying to attach to the process I get this error:
"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."
So, I run it as an administrator, I checked the permission on VSLauncher.exe and devenv.exe to make it run always as an admin, but I still get the error.
I am an administrator already. Has anybody have this same problem?
BTW, I''m using W7, VS2010.
Also, running VS with right click and "Run as administrator" makes no difference.
推荐答案
我自己解决了这个问题.
这是一个权限问题.
Win7带有一个新的安全系统,我必须将此权限(甚至是管理员)添加到我的配置文件中:
控制面板->管理工具->本地安全策略->本地政策->用户权限分配->调试程序->添加用户或组.
在那里,我添加了自己的用户.重新启动计算机(重要!如果不重新启动,它将无法正常工作).
之后,我可以附加进程以对其进行调试.解决这个问题已经很长时间了,希望对发现同样问题的其他人有所帮助.
谢谢大家的帮助.
I solved this myself.
It was a permissions problem.
Win7 comes with a new security system, and I had to add to my profile (even being an admin) this permission:
Control panel -> Administrative tools -> Local Security policy -> Local Policies -> User rights Assignment -> Debug programs -> Add user or group .
And there, I added my own user. Reboot machine(Important!! Without rebooting, it won''t work).
After that, I was able to attach processes to debug them. It''s been a really long time to solve this, I hope to help other people that find this same problem.
Thanks everybody for your help.
我也看到了这一点,即使我将设置始终设置为以管理员身份运行,而我的用户也是管理员,我仍然需要点击并说出您有时会以管理员身份开始.不知道为什么,但是右键单击并选择其他选项对我有帮助.
I have seen this as well and even when I have the settings set for run always as an admin and my user is also an admin, I still need to right click and say to start as an administrator at times. Not sure why but launching with a right click and picking that other option has helped me.
这篇关于VS2010 Win7上的服务调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!