How to stop visual studio from switching to program.cs on (Break All) pause button

This is really annoying.

Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new mainForm()); <-- pausing visual studio breaks here.

Thanks guys.

+3
source share
5 answers

The wil debugger only pauses there if your application is pending (i.e., it is actually executing Application.Run).

If you really don't want to get there, you can try using the "DebuggerNonUserCode" attribute for the method that calls Application.Run, but I would not recommend it.

0
source

@sramey, , ? , , , , Win32, Application.Run(). , , VS .

, - . (, , API ..).

, .

+3
+3

, , .

, , , , F9. . .

, (, i == 0).

Microsoft Visual Studio.

0

, (Edit and Continue) , . , . , VS Program.cs( ) , .

, . , , ( > > ). , Program.cs, , , .

Alternatively, write an application that runs in the background and monitors VS activity, and when it sees that Program.cs is open, close it. For this, you will need the API functions from "user32", such as FndWindow, GetWindowText, etc. There are many code examples showing how to "spy" and manage another application.

0
source

All Articles