visual studio 2008疯狂调试器跳过! [英] visual studio 2008 crazy debugger skipping!

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

问题描述



我正在开发我的C#3.5 ASP.NET MVC网络应用程序,与我一整天都在一起天。没有任何聪明的东西,只是调用其他方法的类的标准方法...



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



我点击f11逐步通过代码,它将移动到下一行/部分行,做它几次,它将随机跳到执行路径中的任意行!!!



跳过的行是一行将被执行,它不会跳到任何旧的行,它只是决定错过了一连串的线之间?? !!!



我从来没有看到这个以前,我怎么调试发生了什么?



有一段时间,我以为Chrome可能会提出两个请求,调试器没有真正跳过,它只是在请求线程之间交换,使其看起来像它的跳跃,但不是!如果我在每一行上设置一个断点,我可以部分阻止它,但需要执行以下操作:

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

一个断点在上面的每一行)是1,2,3,4,5,6,7(即它不会进入OtherMethod();



其他行为看到是1,2,3,然后就可以了,回到所谓的Method()或甚至更远的地方:s



谢谢

解决方案

您是否尝试清理您的解决方案?

- (项目文件夹中的bin和obj文件夹)



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




  • (通常为C:\windows\Microsoft .NET \Framework\v2.0.50727\Temporary ASP.NET文件)

  • 您可能需要先在命令提示符下运行iisreset / stop,然后重新启用与iisreset / start


What the hell could be causing this....

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...

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....

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 the hell do I debug what's going on???

For a while I thought perhaps Chrome is making two requests, and the debugger isnt really skipping, its just swapping between request threads making it look like its jumping about, but thats 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. }

the type of behaviour im seeing (with a breakpoint on every line above) is 1,2,3,4,5,6,7 (i.e. it wont step into OtherMethod();

Other behaviour im seeing is 1,2,3 and then thats it, off back to wherever called Method() or even further away :s

Thanks

解决方案

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

Delete files from the temporary asp.net files folder?

  • (usually C:\windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files)
  • You probably will need to run "iisreset /stop" at the command prompt first, then re-enable with iisreset /start

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

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