21
votes

I'm running Visual Studio 2010 with SP1, as well as R# 5.1, and a few other extensions (like PowerCommands and Productivity Power Tools). Somewhere along the lines, my debugging got super slow. If I use the F10/F11 keys to step, VS hangs for a bit and then steps. If I use the toolbar buttons for stepping, it's snappy as expected.

Any idea what's up with my shortcut keys?

14
Have you ever solved this. I'm having the exact same issue. I've tried the following: Disabling all addons ResetUserData Confirming Debug settings with a user that does not have the problem Delete all breakpoints Delete SUO file No Luck thus far. What I just don't get is how the toolbar buttons can be so fast, but the shortcuts so slow. I'm actually starting to wonder if it's not an issue with a global system hotkeyuser966711
Sadly no. Everyday I want to reformat the machine again. It's PAINFUL. Toolbar is fine, anytime I hit a key though it locks up. The odd thing is that I don't see any spikes or anything in the process monitor (but I have a feeling it's because the machine is locked up)dwhite
Problem also affects VS2013, and keyboard is slow in all applications while the debugger is in a breakpoint for IE (it's not just slow within VS).Jon
This hasn't been a problem for me anymore. Perhaps LastPass fixed the problem in an update? I have VS2013, but I've reformatted my machine since having this problem (a few times). Are you running LastPass? Make sure you have the latest version. I also never use IE for debugging anymore, unless I'm forced to. I use Chrome almost all the time. Do you experience the same issue if you use another browser for debugging? Friends don't let friends use IE :)dwhite
The problem only occurs in IE, not ffox/chrome. I reconfirmed the problem with latest lastpass plugin version (3.1.0). I debug with IE because VS seems to debug better with it.Jon

14 Answers

27
votes

I had exactly the same problem - extremely slow debugging with keyboard (F10 for example). Some symptoms:

  • if I click Step Into on toolbar, then everything works normal,
  • the lag during debugging is present not only in Visual Studio but anywhere (notepad, browser,...),
  • if I set any other browser as default browser in Visual Studio (I tried Firefox), then it works OK,
  • if I disable third-party browser extensions in IE, then it works OK,
  • if I enable third-party browser extensions and disable LastPass, then the problem is gone and debugging with keyboard is fast again!

So, try to disable LastPass extension if you have it or all extensions and try it.

Edit1 - somebody allready posted this on LastPass forum: http://forums.lastpass.com/viewtopic.php?f=12&t=61029

Edit2 - and here on SO also :) https://stackoverflow.com/a/8186670/1110039

13
votes

I've found a deeper explanation for this problem.

I had this problem, with the symptoms user1110039 described BUT I haven't installed LastPass toolbar. And my default browser is Firefox.

Well, my application uses SetWindowsHookEx() function for setting a system wide shortcut. Which happens to be the reason for blocking F10/F11 debug keys (only in Windows 7 64 bits) It doesn't happen under 32 bits.

I've just removed the hook from the debug build and it works ok. I reckon the problem with LastPass is some system wide hook in the code of the extension.

6
votes

I had exactly the same problem. The problem was solved by closing the Watch window.

1
votes

Try debugging with Firefox or Chrome. There must be something about the interaction with IE that is causing this behavior.

1
votes

Disable "show threads in source" worked for me!

1
votes

Calling DirectInput's Acquire() function on a keyboard device is what caused the slowdown for me. This is potentially related to the SetWindowsHookEx() caused slowdown - ie. that might be using DirectInput.

0
votes

It's really odd that the keyboard stepping is slow while the toolbar buttons are not. Typically whenever I hear about a slow stepping experience my recommendation is to disable automatic property and ToString evaluation as this is the most likely cause

  • Tools -> Options
  • Debugger -> Uncheck "Enable property and .ToString evaluation"

I'm not very hopeful that will fix this instance. It sounds like a problem with a misbehaving extension that processes keyboard input. Your best bet is to disable the extensions one by one and see which one fixes the problem. I would do it in the following order

  • Productivity Power Tools
  • Power Commands
  • R#
0
votes

Make sure you've installed Service Pack 1. I believe they fixed at least one significant performance problem in the debugger.

0
votes

I experienced that very slow step by step debugging too, and fixed it by closing the threads window.

0
votes

(Making a note here on an old thread, so it can be found in a web search.)

I normally leave the ==Disassembly== window open during debugging (I have a big screen.) I just discovered that single-stepping in the debugger can be speeded up by 50% if I hide that window too. The -tab- for it can exist and be handy - makes no difference - but the window itself shouldn't be showing. Ahah.

Have followed all the other suggestions and more from elsewhere, single-stepping is now about 8 times faster overall. (About 2.5 steps per second now.) Woo-hoo! Thank you all.

(I don't understand how they can write such slow UI code... I have a CPU here that's running at two billion cycles per second... that works out to about 400 million instructions per single step. Seems like Microsoft code could be a -little- faster... but then, I've never had the pleasure of using .NET etc.)

0
votes

I tried all the suggestion and finally found that When I uninstalled VS2005, this issue got resolved. Note that in that machine VS2005

0
votes

I was having this problem in my new job, where we use Visual Studio 2008 SP1. (Yes, I know, I know). Long delay on step with flickering hourglass. I always use F10, I don't even think about it, there's no way I could tolerate changing to the mouse or waiting multiple seconds for a simple step command.

I read through all the solutions provided here and elsewhere on the net with no joy.

Finally found the issue - I had set up my default language for the IDE as C#. It turns out the project I'm working on actually uses VB.NET, and when I set the default language to VB.NET (via Tools - Import and Export Settings) the debugger got so fast that I couldn't keep up with it and accidentally pressed F5 on the breakpoint I want to examine.

I hope this helps someone else.

0
votes

In the end, the disabling of Last Pass in my browser (IE) was what solved this problem for me, but along the way I learned a lot of other things that could have just as easily been the cause. A variety of other valid answers to this question (Some in the various answers on this page) are validated and explained here:

http://blogs.msdn.com/b/visualstudioalm/archive/2015/03/03/make-debugging-faster-with-visual-studio.aspx

This article explained that this F10 slowdown can be from having various diagnostic windows and toolbars open, Symbol loading issues, etc. and also explained what to do about debug slowdowns in general. It was an eye opening education that I think will continue to help me in the future should the F10 slowdown rear it's head again.

0
votes

In my case it was the Call Stack window (Visual Studio 15.9.13) that caused the lag!

Even when I stepped over a very simple line like ++i; it took around 1-2 seconds until the debugger stepped over to the next line. Closing the Call Stack window or hiding it fixed the lag for me immediately.