简体   繁体   English

Visual Studio 2008 SP1 调试不适用于 IIS 进程(有时)

[英]Vistual Studio 2008 SP1 debugging not working with IIS process (sometimes)

I am using VS 2008 SP1 on Windows 7 and tyring to debug a ASP.net website project by attaching debugger to w3wp process, I noticed that debugger wont stop at the breakpoint at everytime.我在 Windows 7 上使用 VS 2008 SP1 并试图通过将调试器附加到 w3wp 进程来调试 ASP.net 网站项目,我注意到调试器不会每次都在断点处停止。 I researched a lot on this issue and found that its a known issue see this link: http://support.microsoft.com/kb/957912 .我对此问题进行了大量研究,发现它是一个已知问题,请参阅此链接: http : //support.microsoft.com/kb/957912 I tried hotfix but still I am facing the same issue, its really annoying to test.我尝试了修补程序,但仍然面临同样的问题,测试真的很烦人。 Anyone had this issue?有人遇到过这个问题吗?

Note: I am using Asp.net routing feature which introduced in .net 3.5 SP1.注意:我正在使用 .net 3.5 SP1 中引入的 Asp.net 路由功能。

Check that you select "Managed code" in "attach to" dialog.检查您是否在“附加到”对话框中选择了“托管代码”。 And, just in case, maybe it's a problem with your routing and there is nothing to do with debugger?而且,以防万一,也许这是您的路由问题而与调试器无关?

You have to run Visual Studio as an administrator otherwise you are not allowed to attach the debugger to another process.您必须以管理员身份运行 Visual Studio,否则不允许将调试器附加到另一个进程。

Or do you sometimes compile in release mode?或者你有时会在发布模式下编译? You also have to set the option debug='true' in the configuration file (it depends on where you set the breakpoint) and set the correct mode when attaching the debugger (attach to managed code).您还必须在配置文件中设置选项 debug='true'(这取决于您设置断点的位置)并在附加调试器(附加到托管代码)时设置正确的模式。

The breakpoint is also not hit, when you not run the latest version of the code.当您没有运行最新版本的代码时,也不会命中断点。 Make sure you rebuild the code before you attach to w3wp.exe.确保在附加到 w3wp.exe 之前重建代码。 Start the code with F5 in debug mode should always work.在调试模式下使用 F5 启动代码应该始终有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM