Visual Studio 2008疯狂的调试器跳过 [英] Visual studio 2008 crazy debugger skipping

查看:42
本文介绍了Visual Studio 2008疯狂的调试器跳过的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发自己的C#3.5 ASP.NET MVC Web应用程序,就像每天一样.没有做任何聪明的事情,只是在类上调用其他方法的标准方法.

I'm developing my C# 3.5 ASP.NET MVC web app, same as I do all day every day. Not doing anything clever, just standard methods on classes calling other methods.

我构建我的项目,在Chrome中启动一个URL,并获得期望的响应.我将调试器附加到 w3wp.exe 上,在Chrome中设置断点和f5.调试器如预期的那样在断点处停止.

I build my project, fire up a URL in Chrome, and get the response I expect. I attach the debugger to w3wp.exe, set a breakpoint and f5 in Chrome. The debugger stops at the breakpoint as I'd expect.

我按f11键浏览代码,它将移至下一行/下一行,执行几次,它将随机跳至执行路径中的任意行!

I hit f11 to step through the code, and it will move to the next line/part line, do it a few times and it will randomly skip to an arbitrary line in the execution path!

它跳到的行是应该执行的行,它不跳到任何旧行,只是决定错过它们之间的一整行.

The line it skips to is a line that would have been executed, it doesn't skip to any old line, it just decides to miss out a whole bunch of lines in between.

我以前从未见过这种情况,如何调试正在发生的事情?

I've never seen this before, how do I debug what's going on?

有一阵子我以为Chrome可能正在发出两个请求,而调试器并没有真正跳过,它只是在请求线程之间进行交换,因此看起来好像正在跳跃,但事实并非如此!如果我在每行上都设置一个断点,则可以部分阻止它,但是请采取以下措施:

For a while I thought perhaps Chrome is making two requests, and the debugger isn't really skipping, its just swapping between request threads making it look like it's jumping about, but that's not it! If i set a breakpoint on every single line I can partially prevent it, but take the following:

1. public string Method()
2. {
3.     string s;
4.     s = OtherMethod();
5.     return s;
6. 
7. }

我看到的行为类型(上面每一行都有一个断点)是1,2,3,4,5,6,7(即它不会进入 OtherMethod()).

The type of behaviour I'm seeing (with a breakpoint on every line above) is 1,2,3,4,5,6,7 (i.e. it won't step into OtherMethod()).

我看到的其他行为是1,2,3,仅此而已,又回到了Method()甚至更远的地方.

Other behaviour I'm seeing is 1,2,3 and then that's it, off back to wherever called Method() or even further away.

推荐答案

您是否尝试过清洁溶液?
-(您项目文件夹中的bin和obj文件夹)

Have you tried cleaning your solution?
- (the bin and obj folders in your project folder)

从asp.net临时文件夹中删除文件?

Delete files from the temporary asp.net files folder?

  • (通常是C:\ windows \ Microsoft.NET \ Framework \ v2.0.50727 \ ASP.NET临时文件)
  • 您可能首先需要在命令提示符下运行"iisreset/stop",然后使用iisreset/start重新启用

这篇关于Visual Studio 2008疯狂的调试器跳过的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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