简体   繁体   English

VS2012 / C#中未达到某些断点

[英]SOME Breakpoints not hitting in VS2012 / C#

I have somewhat a bizarre problem here. 我这里有些奇怪的问题。 I have a Solution developed with VS2012 in C#. 我有一个使用C#VS2012开发的解决方案 I have 6 Projects in the solution. 我在解决方案中有6个项目 My problem is, with some of the projects in the solution, no code change has any affect on Solution Build. 我的问题是,在解决方案中的某些项目中,没有代码更改对解决方案构建有任何影响。 It's not just new code, not even Breakpoints are getting hit!! 这不仅是新的代码,甚至断点都没有被击中!!

I have done a thorough research in the net, couldn't find anything helpful. 我在网络上进行了彻底的研究,找不到任何有用的信息。

And of course, I have tried 当然,我已经尝试过

  • re-compiling 重新编译
  • deleting all the binaries and compiling again 删除所有二进制文件并再次编译
  • checked solution properties numerous times 多次检查解决方案属性

etc...So, I think I have tried all the basics, but couldn't find a way out. 等等...所以,我想我已经尝试了所有基础知识,但找不到出路。

I gathered some screenshots, but I noticed I need at least 10 reps so I can't post them yet :(. 我收集了一些屏幕截图,但是我注意到我至少需要10次重复,因此我还不能发布它们:(。

Any help at all will be greatly appreciated 任何帮助将不胜感激

Cihan Esen 慈汉·埃森

EDIT: After the responses, I see that I have add, two other guys in my team is working on the same code, same build environment. 编辑:响应后,我看到我已经添加了,团队中的另外两个人正在使用相同的代码,相同的构建环境。 They are not having this problem. 他们没有这个问题。 I cross-checked every single configuration in their system which could remotely relate with this, we definitely have the same settings in VS. 我交叉检查了他们系统中可能与此远程相关的每个配置,我们在VS中肯定有相同的设置。

And yes, I build the solution in DEBUG mode, not RELEASE. 是的,我以DEBUG模式而不是RELEASE构建解决方案。

I have tried seperate clean + build for the problematic projects -> no difference. 我为有问题的项目尝试了单独的clean + build->没什么区别。

EDIT 2 : I have to add; 编辑2 :我必须添加; I have modified the code in the problematic project, so that I would see completely different output, but it didn't work. 我已经修改了有问题的项目中的代码,以便可以看到完全不同的输出,但是它没有用。 I mean that project/class of the solution, is still producing the same result, as if the code has not been changed at all. 我的意思是说,解决方案的项目/类仍在产生相同的结果,好像代码根本没有更改一样。 And yes, I have deleted all the binaries, saw them being built again. 是的,我删除了所有二进制文件,看到它们又被构建了。

This sounds really stupid to me but VS is acting as if it has a version of my source code of this problematic Project/Class, and it always compiles that version. 这对我来说听起来真的很愚蠢 ,但是VS的行为好像是拥有我这个有问题的Project / Class的源代码的版本,并且它始终会编译该版本。

Make sure you are running in dubug mode and try this: 确保您在dubug模式下运行,然后尝试以下操作:

  1. Go to your solution folder. 转到您的解决方案文件夹。
  2. Show hidden files 显示隐藏文件
  3. Close your solution Delete .sou file for solution. 关闭您的解决方案删除.sou文件以获取解决方案。
  4. Add your break points, build your soltion and try. 添加您的断点,建立隔离并尝试。
  • throw away the obj and bin folders 扔掉obj和bin文件夹
  • throw away your .suo files 丢弃您的.suo文件
  • perform IIS reset for webapplications 对Web应用程序执行IIS重置
  • rebuild everything. 重建一切。

should do the trick :) 应该做到这一点:)

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

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