Share via


How to: Start Execution

This topic applies to:

Edition

Visual Basic

C#

F#

C++

Web Developer

Express

Topic applies Topic applies Topic applies Topic applies Topic applies

Pro, Premium, and Ultimate

Topic applies Topic applies Topic applies

Topic applies

Topic applies

Starting execution is one of the most basic debugging functions.

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

To start debugging

On the Debug menu, choose Start Debugging (Keyboard: F5).

Your application runs until

  1. A breakpoint is reached.

  2. You choose Stop Debugging on the Debug menu.

  3. An exception is thrown.

  4. The application exits.

On the Debug menu, choose Step Into (Keyboard F11) or Step Over (Keyboard: F10).

Your application starts and then breaks on the first line.

In a source window, right-click a line of executable code and choose Run to Cursor.

Your application starts and runs until it reaches a breakpoint or the cursor location, whichever comes first.

Your solution might contain more than one project. In that case, you can choose the startup project that the Debug menu execution commands launch. Alternately, you can start a selected project from Solution Explorer.

To start execution of a project without the debugger, go to the the Debug menu and choose the Start without debugging command.

Note

Your ability to debug might be limited by whether the code was built with debug information, whether the debugger has access to the source code, and whether the common language runtime JIT compiler is tracking debug information. If the Visual Studio debugger does not find debug information for your program, it usually reports "no matching symbolic information found." In some cases it omits the message and treats a Start command as "Start without debugging.. By default, debug information is generated when you build the debug configuration of your program. If the debugger cannot find symbols, you might have to specify a symbol path. For more information, see How to: Specify Symbol Locations and Loading Behavior. To aid in debugging system calls, you can install system debug symbols. For more information, see Installing System Debug Symbols.

Note

After you install the .NET Framework on Windows Server 2003 or on Windows 2000 SP3 or later, a limited user account in a Terminal Services session cannot start a process with the debugger until the computer has been rebooted.

See Also

Tasks

How to: Choose the Startup Project

How to: Start Execution of a Selected Project

Concepts

Execution Control

Breaking Execution

Other Resources

Debug Settings and Preparation