调试ASP.NET MVC应用程序时,断点不会被打 [英] When debugging ASP.NET MVC app, breakpoints are not hit

查看:296
本文介绍了调试ASP.NET MVC应用程序时,断点不会被打的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试调试ASP.NET MVC应用程序时,我的控制器中的断点没有被击中。进入调试模式时,它们只显示一个带有警告三角形的空红圈,而不是正常的全圈。这是奇怪的,因为调试工作正常,直到现在,在我的环境中没有配置更改一段时间。



我看到这个问题,看了我的模块视图,正确的没有加载,但是我不知道如何补救这个。此外,所有相关的pdb文件都位于该站点的bin文件夹中。



有关如何解决此问题的任何建议?



编辑:该应用程序作为IIS7上的本地站点运行,我正在使用VS 2008进行调试

解决方案

好的,所以4小时后,我发现设置我的Web项目作为启动项目解决了问题!这肯定是一个错误...



我希望我在那里保存一天半天:)


When trying to debug a ASP.NET MVC app, the breakpoints in my controllers arent getting hit. When entering debug mode they just show an empty red circle with a warning triangle instead of the normal full circle. This is strange because debugging was working fine until now, and no configuration changes have been made in my environment for a while.

I have seen this question and had a look at my modules view and the correct ones aren't being loaded, however I'm not sure how to remedy this. Also all the relevant pdb files are in the bin folder of the site.

Any suggestions on how to fix this?

Cheers!

EDIT: The app is running as a local site on IIS7 and I'm debugging with VS 2008

解决方案

Ok so after 4 hours wasted, I find that setting my web project as the startup project solves the issue! This surely must be a bug...

I hope I save someone out there half a day :)

这篇关于调试ASP.NET MVC应用程序时,断点不会被打的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆