"You could also add an annoying message box that you need to confirm before starting the tests. After seeing this a few times you would never forget about breakpoints again "
Ha ha!
I do this quite a lot.
I have project level booleans for "Test Mode" (which disables most of my logging and reading in of data in favour of local test data in the function). After all, you have to test the test code!
TFS Mode. We use an in-house custom DLL to allow my tests to talk to and update TFS. Needs to be switched off a lot to avoid spamming TFS to death!
Screen Capture mode. Don't always want them.
I also have a local/remote flag. But that is determined by whether or not a dummy folder is present on the C: drive of the machine the test is run on and is used to determine where logs and results are dumped to on completion.
The first three are set to bring up exactly the type of annoying popup you refer to. But if it detects it's running it remote mode, the popups don't happen as there won't be anyone there to see as as most remote runs are started by a build process.
Works well, but I can see how it wouldn't be much fun to reverse engineer some of it in. I've had all in this place, as part of a larger test framework, since the start. (Lessons learned from the QTPro days mostly ...)