Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio - Prevent F11 from starting the debugger?

Is there a way to prevent Visual studio to start the debugger when pressing F11? I often press it by mistake when I want to actually press F12. I do not want to loose the functionality of Step-into which F11 provides but it is annoying when it starts the application.

like image 703
Dalibor Čarapić Avatar asked Mar 21 '12 13:03

Dalibor Čarapić


People also ask

How do I turn off debugging in Visual Studio?

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

What is the use of F11 key in Visual Studio?

The F11 key in the Microsoft Visual Studio 2005 environment activates the Step Into debug function.

How do I get rid of run Debug in VS code?

Just disable Enable Code Lens in jest plugin. It's very annoying! When you write test code, small Debug text shows on top of a test (above it method) when it fails. During programming, it constantly shows and hides, causing lines of code move up and down a bit.

How do I disable debugging in Visual Studio 2010?

Stop ExecutionSelect Stop debugging from Debug menu to end a debugging session. You also can stop debugging from the processes window. In that window, right-click the executing process and select the Detach Process or Terminate Process command.


2 Answers

This is for VS 2010, but it should be similar for others.

In Tools->Options, open Keyboard under Environment. Look up the command Debug.StepInfo. You can remove the default shortcut (F11 (Global)) and then just use the toolbar button to step into, or right click and "Step into specific"--which is what I do since it keeps the debugger from diving into STL functions if they're part of a line of code (as an example).

like image 191
cvanbrederode Avatar answered Sep 17 '22 13:09

cvanbrederode


A hack-around that I use is to use the cancel build command after I accidentally hit F11. The default shortcut is ctrl+pause/break.

This doesn't stop F11 starting a build, but should stop it from running your program.

like image 33
Steve Avatar answered Sep 19 '22 13:09

Steve