Compartilhar via


Como: Aplicar edições no modo de interrupção com editar e continuar

This topic applies to:

Edition

Visual Basic

C#

F#

C++

Web Developer

Express

O tópico é aplicável O tópico não é aplicável O tópico não é aplicável O tópico não é aplicável O tópico é aplicável

Pro, Premium e Ultimate

O tópico é aplicável O tópico não é aplicável O tópico não é aplicável O tópico não é aplicável O tópico é aplicável

You can use Edit and Continue to edit your code in Break mode, and then continue without stopping and restarting execution.

Edit and Continue is not available in the following debugging scenarios:

  • Mixed-mode (native/managed) debugging.

  • SQL debugging.

  • Depuração um Dr. Despejo do Watson.

  • Edição do código após uma exceção não tratada, quando o Unwind the call stack on unhandled exceptions não está selecionada.

  • Debugging an embedded runtime application.

  • Debugging an application with Attach to rather than running the application with Start from the Debug menu.

  • Debugging optimized code.

  • Debugging managed code when the target is a 64-bit application. If you want to use Edit and Continue, you must set the target to x86. (Project Properties, Compile tab, Advanced Compiler setting.).

  • Debugging an old version of your code after a new version failed to build due to build errors.

To edit code in Break mode

  1. Enter Break mode by doing one of the following:

    • Set a breakpoint in your code, then choose Start Debugging from the Debug menu and wait for the application to hit the breakpoint.

      – ou –

    • Start debugging, and then select Break All from the Debug menu.

      – ou –

    • When an exception occurs, choose Enable Editing on the Exception Assistant.

  2. Make any desired and legal code changes.

    For more information, see Editar e continuar (Visual Basic): Não há suporte para edições de declaração and Editar e continuar (Visual Basic): Unsupported Method and Property Body Edits.

    ObservaçãoObservação

    Se você tentar alterar um código que não é permitida pelo Edit and Continue, sua edição será sublinhada por uma linha ondulada púrpura e uma tarefa será exibido na lista de tarefas. You will not be able to continue code execution unless you undo the illegal code change.

  3. On the Debug menu, click Continue to resume execution.

    Your code now executes with your applied edits incorporated into the project.

Consulte também

Referência

Editar e continuar (Visual Basic): Não há suporte para edições de declaração

Editar e continuar (Visual Basic): Unsupported Method and Property Body Edits

Outros recursos

Editar e continuar (Visual Basic)