The call stack will make it obvious. One must guess without one: yes, the debugger can certainly affect the GUI code. In particular, setting a breakpoint. This is a side effect of changing focus from your window to the main Visual Studio window. And back. This affects the code that signs the Windows "De / Activated" events, Got / LostFocus, and any code that includes drawing if VS overlaps your window.
This, of course, can interfere with debugging GUI code, which depends on these events. In extreme cases, you may need to configure the remote debugger on another machine so that focus switching is not performed during debugging.
ScrollControlIntoView () is also related. This usually happens automatically when the control gains focus. This roughly matches your question, but it's hard to see how it can be useful to solve your problem. Be sure to look at the call stack for more information.
source share