How to: Start Execution
This topic applies to:
Edition |
Visual Basic |
C# |
F# |
C++ |
Web Developer |
---|---|---|---|---|---|
Express |
|||||
Pro, Premium, and Ultimate |
Starting execution is one of the most basic debugging functions.
Poznámka
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,Step Into, or Step Over.
-or-
In a source window, right-click a line of executable code and choose Run to Cursor.
If you choose Start, your application starts and runs until it reaches a breakpoint. You can break execution at any time to examine values, modify variables, and otherwise examine the state of your program. For more information, see Breaking Execution.
If you choose Step Into or Step Over, your application starts and executes then breaks on the first line.
If you choose Run to Cursor, your application starts and runs until it reaches a breakpoint or the cursor location, whichever comes first. You can set the cursor location in a source window. In some cases, a break does not occur. This means that execution never reached the code where the cursor is set.
Your solution might contain more than one project. In that case, you can choose the startup project that will be launched by the Debug menu execution commands. Alternately, you can start a selected project from Solution Explorer.
You can use the Start without debugging command (on the Debugmenu) to start execution of a project without the debugger.
Poznámka
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.. Debug information is generated by default when you build the debug configuration of your program. If the debugger cannot find symbols, you might need 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.
Poznámka
After installing 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