Debug tasks
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
To debug a program, it must be launched and a debug engine (DE) must be attached to it, or else the DE must be attached to a previously launched program. Once attached, the DE must generate certain startup events. In response, the debug package attempts to bind the breakpoints set in the IDE. When the program hits a bound breakpoint, it halts and waits for user input.
In this section
Security issues Discusses the security steps that are needed to debug a program.
Launch a program Provides step-by-step instructions on how to specify a DE, which calls the operating system to launch the program.
Attach directly to a program Describes the process used to debug a program in a process that is already running.
Send startup events after a launch Lists the events that take place once the DE is attached to the program, until the program is at its main entry point and is ready for debugging.
Control of execution Explains how the DE typically sends an entry-point event, a load-complete event, or a stopping event, depending on the circumstances.
Bind breakpoints Describes how, if the user sets a breakpoint, the IDE formulates the request and prompts the debug session to create the breakpoint.
Evaluate expressions Explains how expressions are created and what happens when an expression is evaluated.
Visualize and view data Explains how type visualizers and custom viewers are supported by the expression evaluator (EE).
Related sections
Debugger concepts Describes the main debugging architectural concepts.
Debugger components Provides an overview of the Visual Studio debugging components, which include the DE, EE, and symbol handler (SH).
Debugger contexts Explains how the DE operates simultaneously within code, documentation, and expression evaluation contexts. Describes, for each of the three contexts, the location, position, or evaluation relevant to it.