'MS VC++: When debugging and performing a step over/into (F10/F11 keys) suddenly and randomly it behaves as Start Debugging (F5)
I have a VSTO Addin under .NET Framework 4.5 and Visual Studio 2019. This Addin loads at startup a VC++ app (e.g. app.exe) using Process.Start in case of it is not running yet. Then the Addin performs some calls to it later.
Now I would like to debug the VC++ app (app.exe) so I have two ways to do it:
- Open 2 instances of Visual Studio. In one instance of VS I start running the VC++ app (app.exe). Then once it is running, I open a second instance of VS and I start running the Addin (in this case Addin does not load the VC++ app - app.exe - because it is already running).
- Open 2 instance of Visual Studio. From one instance I run the Addin. As Addin is the first to run in this case, it loads using Process.Start the VC++ app - app.exe - because it detects it is not running yet. Once Addin is running, from the second instance of VS (VC++ app), I attach to the process started by the Addin (the process is VC++ app - app.exe -).
Now I have set a breakpoint in the VC++ app project. When the Addin makes a call to the VC++, it stops at the breakpoint I have set. Now I start pressing F10(Step over) or F11(Step Into) according to my needs but suddenly and randomly (not always in the same line) when I press F10 or F11 it behaves as I had pressed F5 - it seems it is in running state, don't stop - (Well, in fact it hangs, Visual Studio UI not responding, even I can't stop debugging so I end up by killing the Visual Studio process). I have seen the output window in order to see if some error has happened but nothing is outputted there. So I cannot debug it.
Any ideas why is happening this?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
