Summary of Answers
To avoid the debugger trapping Ctrl+C first turn off the Visual Studio Hosting Process (found in project properties, Debug tab)
If you're using the Express version of Visual Studio, that's all you can do.
If you're using the Pro or better version of Visual Studio you can additionally open Debug > Exceptions..., Win32 Exceptions, and uncheck Ctrl+C.
As as alternative, you can use Ctrl+Break when debugging, unless like me Ctrl+C is hard-wired into your brain.
Original
The following has been edited. Hans seems to have retracted his answer, but his questioning has helped me to narrow down the problem statement:
Extra Clarity
Please note that the following example is contrived. It's just to demonstrate the behavior. I changed the ReadKey line as it was distracting people.
Debug (run) the following program:
class Program
{
static void Main()
{
System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
}
}
Press Ctrl+C. The debugger will break as if you set a breakpoint on the Sleep line.
How do you turn this off? I don't want the debugger to break at all for Ctrl+C.
This doesn't happen at home with VS2008 Pro.
I have now tried it with both VS2008 Express and VS2010 Express (the only editions I can test it with easily) and they all do it. This has led me to believe that either it's an Express behavior, or that there is a setting somewhere to toggle it on/off.
I found the answer, it is a debugging Exception option. I don't know how I missed it the first time, but here it is:
Debug -> Exceptions... Win32 Exceptions - Control-C
This is in VS2008 Pro.
I can also confirm that the option does NOT exist in the Express editions (the entire Win32 Exceptions node is missing).
So the only question I have left, since I don't own VS2010 Pro (yet?) is: Does the Win32 Exceptions node, and the Control-C exception exist in the VS2010 Pro edition?