Why does F10 (step over) in Visual Studio 2010 not

2019-06-15 07:08发布

I also tried 2 solution. But It doesn't worked.

  1. Go to Tools > Options menu in Visual Studio.
  2. Go to Debugging > General menu item in left pane.
  3. In right view you will see and option Step over properties and operators (Managed only). Uncheck this option and then you are all set.

and

  1. Go to Tools > Options menu in Visual Studio.
  2. Go to Debugging > General menu item in left pane.
  3. In right view you will see and option Enable Just My Code (Managed only). Uncheck this option and then you are all set.

11条回答
可以哭但决不认输i
2楼-- · 2019-06-15 07:34

Tools - Options - Environment - Keyboard

Search with "Debug.StepOver", check is the shortcuts for selcted comman was set to F10(Global), if not then set it you should get it work. If the setting is correct, then you may running some other program that has registered the F10 key as a glabol hotkey and make this fail, try to open as few program as you can see if you find that program, or just change it to another key

查看更多
forever°为你锁心
3楼-- · 2019-06-15 07:35

Issue Description:

Same issue as OP , but a little bit worse:

When I tried click any key in "Press shortcut Keys" here: VS2013 Keyboard options

I couldn't use F10, but I could use Alt+F10

Resolve:

Turns out I had few shortcut on my desktop with shortcut set to F10.

Application shortcut using F10 shortcut key

all of the shortcuts added (probably) by some bloatware I've installed by mistake.

I have deleted these shortcuts. and had to restart Explorer.exe process.

查看更多
趁早两清
4楼-- · 2019-06-15 07:36

I also ran into this problem in Visual Studio 2012, and what fixed it for me was disabling .NET Reflector.

查看更多
贪生不怕死
5楼-- · 2019-06-15 07:39

Another very specific situation that could cause stepping to not work: I have been using VS for many years with no problem. All of a suddden, in one particular (new) file, I could not step using the debugger. Using the Step Over command on the menu or by pressing F10 was causing it to step out of the method. The culprit? The [DebuggerStepThrough] attribute! I had copied a simple class used to represent an object that was serializable to XML. It had the DebuggerStepThrough attribute on it, and I wondered about it for a moment, but then forgot about and coded away, making several copies of it to set up the classes that would provide the required XML structure. Then in one of those classes I added a method that had some actual meaty logic. That's when I discovered I couldn't step through it. I could set breakpoints on individual lines and the debugger would stop, but that was getting to be a nuisance. As I read through all the above solutions and didn't find anything helpful, I suddenly remembered seeing the [DebuggerStepThrough] attribute. Hope this helps someone else.

查看更多
劳资没心,怎么记你
6楼-- · 2019-06-15 07:40

CamStudio application was the issue in my case.
Somehow it reserved this key to itself and Visual Studio was not able to use it anymore (I've tested it MS Word (Alt+F10 - was working as expected, while CamStudio was on - when minimized it appears only in SysTray)).
I've closed CamStudio and it was fine:
F10 functionality "reappeared" in VS2008.

查看更多
Luminary・发光体
7楼-- · 2019-06-15 07:45

In the Options.Keyboard page, please select "Debug.StepOver" from the command listbox, and then put focus to the "Press shortcut keys" textbox and press F10, click Assign button to re-assign shortcut, does it work?

You can also try to run Visual Studio under safe mode, which will prevents all third-party VSPackages from loading when Visual Studio starts; if the issue disappear under safe mode, you may consider checking your installed add-ons or VSPackages.

Second, to log all activity of Visual Studio to a log file for further troubleshooting, please use the /Log switch, and post the log file content here, so we can do more investigation on it.

If this feature works well before, and suddenly behave abnormally, it usually indicate that some files or configurations of Visual Studio installation is corrupted or missed, you can:

  1. Restores Visual Studio default settings by using "Devenv.exe /ResetSettings" command. Please backup your settings before restore to default settings.

  2. Repair/reinstall Visual Studio;

To repair Visual Studio In the Add or Remove Programs dialog box, select Visual Studio then click Change/Remove.

查看更多
登录 后发表回答