Share via


Debugging Shortcut Keys, Visual C# Scheme

The following shortcut key combinations can be used when you debug code.

Note

When you select Visual C# Development Settings in the Import and Export Settings Wizard, the Visual C# 2005 keyboard mapping scheme is applied. Visual C# 2005 is the current keyboard mapping scheme. This is the keyboard mapping scheme that is applied to the integrated development environment (IDE) at initial startup. For more information, see How to: Change Select Settings.

To switch to the Visual C# keyboard mapping scheme

  1. On the Tools menu, click Options.

  2. Expand Environment, and then click Keyboard.

  3. Select Visual C# 2005 from the Apply the following application keyboard mapping scheme drop-down list.

Command Name

Shortcut Keys

Description

Debug.ApplyCodeChanges

ALT + F10

Starts a build that lets you use the Edit and Continue feature to apply changes to code that is being debugged.

Debug.Autos

CTRL + D, A

Displays the Auto window, which displays variables used in the current line of code and the previous line of code.

Debug.BreakAll

CTRL + ALT+ Break

Temporarily stops execution of all processes in a debugging session. Available only in Run mode.

Debug.BreakAtFunction

CTRL + D, N

Displays the New Breakpoint dialog box.

Debug.Breakpoints

CTRL + D, B

Displays the Breakpoints dialog box, where you can add, remove, and modify breakpoints.

Debug.CallStack

CTRL + D, C

Displays the Call Stack window, which displays a list of all active methods or stack frames for the current thread of execution.

Debug.DeleteAllBreakpoints

CTRL + SHIFT + F9

Clears all the breakpoints in the project.

Debug.Disassembly

CTRL + ALT + D

Displays the Disassembly window.

Debug.EnableBreakpoint

CTRL + F9

Toggles the breakpoint between disabled and enabled.

Debug.Exceptions

CTRL + D, E

Displays the Exceptions dialog box.

Debug.Immediate

CTRL + D, I

Displays the Immediate window, where expressions can be evaluated.

Debug.Locals

CTRL + D, L

Displays the Locals window, which displays the local variables and their values for each method in the current stack frame.

Debug.Memory1

CTRL + ALT + M, 1

Displays the Memory 1 window to view large buffers, strings, and other data that do not display clearly in the Watch or Variables windows.

Debug.Memory2

CTRL + ALT + M, 2

Displays the Memory 2 window to view large buffers, strings, and other data that do not display clearly in the Watch or Variables windows.

Debug.Memory3

CTRL + ALT + M, 3

Displays the Memory 3 window to view large buffers, strings, and other data that do not display clearly in the Watch or Variables windows.

Debug.Memory4

CTRL + ALT + M, 4

Displays the Memory 4 window to view large buffers, strings, and other data that do not display clearly in the Watch or Variables windows.

Debug.Modules

CTRL + D, M

Displays the Modules window, which lets you view the .dll or .exe files that are used by the program. In multiprocess debugging, you can right-click and then click Show Modules for all Programs.

Debug.Processes

CTRL + D, P

Displays the Processes window. Available in Run mode.

Debug.QuickWatch

CTRL + D, Q

Displays the QuickWatch dialog box that has the current value of the selected expression. Available only in Break mode. Use this command to examine the current value of a variable, property, or other expression for which you have not defined a watch expression.

Debug.Registers

CTRL + D, CTRL + R

Displays the Registers window, which displays registers content for debugging native code applications.

Debug.Restart

CTRL + SHIFT + F5

Ends a debugging session, rebuilds, and then starts to run the application from the start. Available in Break and Run modes.

Debug.RunToCursor

CTRL + F10

In Break mode, resumes execution of your code from the current statement to the selected statement. The Current Line of Execution margin indicator appears in the Margin Indicator bar. In Design mode, starts the debugger and executes your code to the pointer location.

Debug.ScriptExplorer

CTRL + ALT + N

Displays the Script Explorer window which lists the set of documents that you are debugging. Available in Run mode.

Debug.SetNextStatement

CTRL + SHIFT + F10

Sets the execution point to the line of code you select.

Debug.ShowNextStatement

ALT + NUM *

Highlights the next statement to be executed.

Debug.Start

F5

Launches the application under the debugger based off of the settings from the startup project. When in Break mode, invoking this command will run the application until the next breakpoint.

Debug.StartWithoutDebugging

CTRL + F5

Runs the code without invoking the debugger.

Debug.StepInto

F11

Executes code one statement at a time, following execution into method calls.

Debug.StepIntoCurrentProcess

CTRL + ALT + F11

Available from the Processes window.

Debug.StepOut

SHIFT + F11

Executes the remaining lines of a function in which the current execution point is located.

Debug.StepOutCurrentProcess

CTRL + SHIFT + ALT + F11

Available from the Processes window.

Debug.StepOver

F10

Executes the next line of code, but does not follow execution through any method calls.

Debug.SetpOverCurrentProcess

CTRL + ALT + F10

Available from the Processes window.

Debug.StopDebugging

SHIFT + F5

Stops running the current application under the debugger.

Debug.Threads

CTRL + D, T

Displays the Threads window to view all the threads for the current process and information about them.

Debug.ToggleBreakpoint

F9

Sets or removes a breakpoint at the current line.

Debug.ToggleDisassembly

CTRL + D, D

Displays the disassembly information for the current source file. Available only in Break mode.

Debug.Watch

CTRL + ALT + W, 1 or

CTRL + D, W

Displays the Watch window, which displays the values of selected variables or watch expressions.

Debug.Watch2

CTRL + ALT + W, 2

Displays the Watch2 window to view the values of selected variables or watch expressions.

Debug.Watch3

CTRL + ALT + W, 3

Displays the Watch3 window to view the values of selected variables or watch expressions.

Debug.Watch4

CTRL + ALT + W, 4

Displays the Watch4 window to view the values of selected variables or watch expressions.

DebuggerContextMenus.BreakpointsWindow.Delete

ALT + F9, D

Removes the selected breakpoint. Available within the Breakpoints window only.

DebuggerContextMenus. BreakpointsWindow.GoToDisassembly

ALT +F9, A

Displays the Disassembly window. Available within the Breakpoints window only.

DebuggerContextMenus. BreakpointsWindow.GoToSourceCode

ALT +F9, S

Goes to the location of the selected breakpoint in the code file. Available within the Breakpoints window only.

Tools.AttachToProcess

CTRL + ALT + P

Displays the Attach To Process dialog box, which lets you debug multiple programs at the same time in a single solution.

See Also

Concepts

Visual C# Default Shortcut Keys