Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop current operation in Visual Studio

When using Visual Studio I often encounter situations when the IDE freezes while performing some operation. For instance, this frequently happens when I move next statement pointer (yellow arrow) during the debug session, when I unintentionally press F1, step into some low-level function that has multiple instantiations in the binary code etc.

In these situations Visual Studio notification balloon shows up in the tray with the following text:

Microsoft Visual Studio is Busy

Microsoft Visual Studio is waiting for an internal operation to complete. If you regularly encounter this delay during normal usage, please report this problem to Microsoft.

Often the delay is so long that it is faster to kill the Visual Studio process, start it over again, restart debugging session (or whatever else I was doing) and avoid doing an operation that has caused such a delay. However, this still takes too much time. I would like to have a way to stop/cancel the operation that is taking so much time. For instance, in Total Commander this is possible by pressing Esc during such an operation.

Is something like this possible with Visual Studio? Any plugins that allow doing it? Any other way to circumvent the problem?

P.S. Sorry for the lenghty description, but I wanted to explain the actual problem (not ask if certain solution is possible), so that people can think of ways to solve the problem.

P.P.S. Both 2008 and 2010 suffer from this problem.

like image 836
Sergiy Belozorov Avatar asked Aug 21 '11 01:08

Sergiy Belozorov


People also ask

How do I stop the current publish operation in Visual Studio?

Hi, You can easily cancel the publish from Build menu-> Cancel. If you are deploying a web application, there is a web deploy window open at the bottom of Visual Studio.

How do you stop a program in Visual Basic?

You can place Stop statements anywhere in procedures to suspend execution. Using the Stop statement is similar to setting a breakpoint in the code. The Stop statement suspends execution, but unlike End , it does not close any files or clear any variables, unless it is encountered in a compiled executable (.exe) file.

How do I stop debugging in Visual Studio?

To end a debugging session in Microsoft Visual Studio, from the Debug menu, choose Stop Debugging.


2 Answers

If you're debugging, try hitting SHIFT-F5. This should stop the debugger, though probably not immediately, faster than what you've described. The program will process the keyboard a lot faster than trying to click menus with the mouse.

If you're building, try hitting CTRL-Break. Again, it may take a few seconds, but it usually comes around.

I've had the problem you mentioned a few years ago, but I can't remember what I ultimately did to fix it.

like image 169
Edward Robertson Avatar answered Sep 21 '22 10:09

Edward Robertson


There may be many different causes of this issue, but for me apparently what was slowing it down was trying to load symbols from symbol servers. I unchecked the Symbol file (.pdb) locations in the Debugging\Symbols options and the problem went away entirely.

like image 39
Daniel Plaisted Avatar answered Sep 20 '22 10:09

Daniel Plaisted