Visual studio 2010 debugger automatically set breakpoint at the beginning of Main() on application start (C# project). So each time I start application in the debug mode it paused at the beginning. Please suggest how to disable it.
update:
– I definitely hit “Start debugging (F5)” and NOT “Step into new Instance (F10)”. Use F5 key or menu
– There in definitely no breakpoint
– It is simple and usual Main method:
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new ExpertEntryForm());
}
P.S. It is funny, but I really can’t find (and google) this checkbox!
Solution
Indeed it was a stale breakpoint which didn’t show up in breakpoint list and editor but was activated each application start.
Solve it by:
1. Add a new breakpoint somewhere. (So there is at least one breakpoint in breakpoints list)
2. Press Debug->Delete all breakpoints
So leppie’s suggestion should work too.
Delete your
*.userfiles.Might be a stale breakpoint failing to show up.
You can try looking at the breakpoints too in
Debug > Breakpoints.