When a breakpoint is hit in Visual Studio, it steals the focus from whatever other application the programmer is
This is finally fixed in VS2019. Go to Tools->Options->Debugging->General, down at the bottom is "Bring Visual Studio to the foreground when breaking in the debugger." Just de-select it and you will no longer be interrupted while multitasking.