自最后步骤的进程或线程已经改变 [英] The process or thread has changed since last step

查看:215
本文介绍了自最后步骤的进程或线程已经改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我调试了一些在Visual Studio中我的code的。这code属于我创建了一个自定义的会话提供程序,我调试它在我的web应用程序启动。它开始初始化我的供应商,并在该函数我有被成功击中第一次一个断点。然而,同样的断点被再次袭来,但它有一个小的蓝色图标,如果你将鼠标悬停在,显示此消息:


  

自最后步骤的进程或线程已改变


在我的研究,我发现了几种答案,从人们说断点击中不同的装配到一些人说,断点已经从不同的线程的打击。

有谁知道这是什么真正的意思?


解决方案

当你运行在同一块code的多线程和你有一个断点,Visual Studio将每次停止执行的那些线程命中断点。
这将发生的每个线程,在一个未predictable秩序。
当你用你的code调试一步一步,另一个线程可以执行code,你是调试和命中断点。 Visual Studio将让你了解这通过把那个蓝色圆圈与下面的语句箭头感叹号。

查看更多在这里:在Visual Studio

I'm debugging some of my code on Visual Studio. This code belongs to a custom Session Provider that I created, and I'm debugging it on my web application launch. It starts initializing my provider, and on that function I have a breakpoint that is being hit successfully the first time. However, that same breakpoint is being hit again, but it has a small blue icon and if you hover over, this message is displayed:

The process or thread has changed since last step

On my research I've found several kinds of answers, from people saying that the breakpoint is hitting a different assembly to some others saying that the breakpoint has been hit from a different thread.

Does anybody know what does this really mean?

解决方案

When you have multiple threads running the same piece of code and you have a breakpoint there, Visual Studio will stop the execution every time any of those threads hit the breakpoint. This will happen for every thread, in an unpredictable order. When you are debugging step by step on your code, another thread can execute the code that you were debugging and hit the breakpoint. Visual Studio will let you know about this by putting that blue circle with the exclamation mark on the next statement arrow.

See more here: Debug Multithreaded Applications in Visual Studio

这篇关于自最后步骤的进程或线程已经改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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