Compartilhar via


Guia para o depurador

The Visual Studio debugger is a powerful tool that allows you to observe the run-time behavior of your program and locate logic errors. The debugger works with all Visual Studio programming languages and their associated libraries. With the debugger, you can break, or suspend, execution of your program to examine your code, evaluate and edit variables in your program, view registers, see the instructions created from your source code, and view the memory space used by your application. With Edit and Continue, you can make changes to your code while debugging, and then continue execution.

The Visual Studio debugger provides a Debug menu for access to debugger tools. Debugger windows and dialog boxes display information about your program and enable you to enter additional information. You can obtain Help on any window or dialog box by pressing F1.

Nesta seção

  • Execution Control
    Explains how to use the debugger to control the execution of your application. Using the debugger, you can start, or continue, execution, break execution, stop execution, step through your application, run to a specified location, and set the execution point.

  • Como: Restaurar comandos ocultos do depurador
    Describes how to make debugger commands visible that have been hidden by IDE default settings.

  • Trabalhando com segmentos e processos
    Describes how to attach to, and control the execution of, processes and threads.

  • Just-In-Time Debugging
    Discusses Just-In-Time debugging, which can start the debugger automatically when a program crashes while running outside of Visual Studio.

  • Launching the Debugger Automatically
    Provides instructions on setting up your application to start Visual Studio when you start the application from Windows. Visual Studio will load your application, ready for debugging, but debugging will not begin until you issue an execution command. Launching the debugger in this way is useful for debugging services and COM out-of-process servers.

  • Demonstra Passo a passo: Depuração em tempo de Design
    Shows how to use the Visual Studio Immediate window to execute a function or subroutine while your application is not running.

  • Arquivos de despejo.
    Describes dump files, including instructions on saving and opening. Dump files contain a snapshot of your program's state at some point in time, usually after a crash. If you test your program on a machine that does not have source files or PDBs installed, you can save a dump file when a crash occurs and use the dump file to debug the crash on the build machine that has the source files and PDBs.

  • Breakpoints and Tracepoints
    Describes what breakpoints and tracepoints are and how to use them.

  • Exibindo Dados no Depurador
    Provides information on a variety of debugging tools that enable you to inspect and modify the state of your program. Most of these tools function only in break mode.

  • Expressões no depurador
    Provides links to topics that describe the language-specific syntax you can use when entering C++, C#, C++, Visual Basic, J#, and Script expressions in the debugger.

  • Exception Handling
    Describes exceptions, how the debugger handles them and how to change that handling, how to see where the exception occurred and see the variable contents, limitations for unhandled exceptions in managed code, and fixing exceptions in native (C++) code.

  • Edit and Continue
    Describes Edit and Continue, a tool that enables you to change your source code while your program is in break mode and apply those changes without having to end the debug session and build your program again, and provides instructions on enabling or disabling this feature.

Seções relacionadas

  • Debugging Home Page
    Provides links to the larger sections of the debugging documentation. As informações incluem: o que há de novo no depurador, configurações e preparação, pontos de interrupção, tratamento de exceções, editar e continuar, depuração gerenciada de código, depurando projetos Visual C++, depurando COM e ActiveX, depurando DLLs, SQL de depuração e as referências de interface do usuário.

Consulte também

Conceitos

Segurança do Depurador

Outros recursos

Depuração no Visual Studio