Debugging Your Visual Basic Application
Updated: July 20, 2015
For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.
This page provides links to documentation for the debugging features that are built into Visual Studio. For example, you can find semantic errors in your application by observing its run-time behavior in the debugger itself.
By using the debugger, you can examine the content of variables in your application without inserting additional calls to output the values. Similarly, you can insert a breakpoint in your code to halt execution at the point that you specify.
The following table lists debugging tasks involving execution control and provides links to their associated Help pages.
|Start to debug a Visual Studio project, attach to a process, break into code, step through code, run to the cursor, run to a function on the call stack, set the next statement, step through Just My Code, stop debugging, restart debugging, or detach from a debugged process.||Navigating through Code with the Debugger|
|Specify the configurations for the debug and release versions of a program.||Debug and Release Project Configurations|
|Set start options (command-line arguments, working directory, remote machine)||NIB: How to: Set Start Options for Application Debugging|
|Debug at design time.||Walkthrough: Debugging at Design Time|
|Enable just-in-time debugging, which launches the Visual Studio debugger when a program running outside Visual Studio encounters a fatal error.||Just-In-Time Debugging|
|Set breakpoints for source lines, assembly instructions, and call stack function. Specify conditions, hit counts, and execution location.||Using Breakpoints|
The following table lists debugging tasks involving exception handling and points to their associated Help pages.
|Break on unhandled exceptions.||How to: Break on User-Unhandled Exceptions|
|Break when an exception is thrown.||How to: Break When an Exception is Thrown|
|Break on first-chance exceptions.||How to: Break When an Exception is Thrown|
|Use the exception assistant.||How to: Correct Run-Time Errors with the Exception Assistant|
|Add a new exception.||How to: Add New Exceptions|
|Continue execution after an exception has been thrown.||Continuing Execution After an Exception|
The following table lists debugging tasks involving Edit and Continue and points to their associated Help pages.
|Turn Edit and Continue off and on.||How to: Enable and Disable Edit and Continue|
|Stop Edit and Continue from applying code changes.||How to: Stop Code Changes|
|Apply edits in break mode.||How to: Apply Edits in Break Mode with Edit and Continue|
The following table lists debugging tasks involving viewing debugging data and points to their associated Help pages.
|Use the Registers window to display register contents.||How to: Use the Registers Window|
|Use the Call Stack window to view function or procedure calls that are currently on the stack.||How to: Use the Call Stack Window|
|Use the Disassembly window to view assembly code corresponding to the instructions created by the compiler.||How to: Use the Disassembly Window|
|Use the Modules window to list and describe modules used by your program.||How to: Use the Modules Window|
|Use the Script Explorer window to list script files that are currently loaded into the program.||How to: View Script Documents|
|Use the Threads window to examine and control threads in the program.||How to: Use the Threads Window|
Walkthrough: Debugging a Windows Form
Debugging Managed Code
Debugging Native Code
Debugging Web Applications and Script
Debugging User Interface Reference
Debugger Settings and Preparation
Navigating through Code with the Debugger
C#, F#, and Visual Basic Project Types
How to: Apply Edits in Break Mode with Edit and Continue