The process or thread has changed since the last step

I am debugging part of my code in Visual Studio. This code belongs to the created user session provider, and I am debugging it when the web application starts. It starts initializing my provider, and in this function I have a breakpoint that successfully hits the first time. However, the same breakpoint is hit again, but it has a small blue icon, and if you hover over it, this message is displayed:

The process or thread has changed since the last step.

In my research, I found several answers from people saying that the breakpoint is hitting another assembly, and some others say that the breakpoint was removed from another thread.

Does anyone know what that means?

+5
source share
2 answers

If you have multiple threads working with the same code snippet and you have a breakpoint, Visual Studio will stop executing each time any of these threads hits the breakpoint. This will happen for each thread in an unpredictable order. When you debug step by step on your code, another thread can execute the code you debug and hit the breakpoint. Visual Studio will report this by placing this blue circle with an exclamation mark on the next arrow of the operator.

See here: Debugging multithreaded applications in Visual Studio

+4
source

This icon simply means that the breakpoint hit a different thread than the last thread you were on. This does not affect program behavior at all.

0
source

Source: https://habr.com/ru/post/958705/


All Articles