Compartilhar via


Otimização e Depuração JIT

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

O tópico é aplicável O tópico é aplicável

Managed only

O tópico é aplicável

Pro, Premium e Ultimate

O tópico é aplicável O tópico é aplicável

Managed only

O tópico é aplicável

Quando você depurar um aplicativo gerenciado, Visual Studio suprime a otimização de código do just-in-time (JIT) por padrão. Suppressing JIT optimization means you are debugging non-optimized code. The code runs a bit slower because it is not optimized, but your debugging experience is much more thorough. Debugging optimized code is harder and recommended only if you encounter a bug that occurs in optimized code but cannot be reproduced in the non-optimized version.

Otimização JIT é controlada no Visual Studio , o Suppress JIT optimization on module load opção. You can find this option on the General page under the Debugging node in the Options dialog box.

If you clear the Suppress JIT optimization on module load option, you can debug optimized JIT code, but your ability to debug may be limited because the optimized code does not match the source code. As a result, debugger windows such as the Locals and Autos window may not display as much information as they would if you were debugging non-optimized code.

Another important difference concerns debugging with Just My Code. If you are debugging with Just My Code, the debugger considers optimized code to be non-user code, which should not be displayed while you are debugging. Consequently, if you are debugging JIT optimized code, you probably want to turn Just My Code off. For more information, see Como: Basta entrar meu código..

Remember that the Suppress JIT optimization on module load option suppresses optimization of code when modules are loaded. If you attach to a process that is already running, it may contain code that is already loaded, JIT-compiled, and optimized. The Suppress JIT optimization on module load option has no effect on such code, although it will affect modules that are loaded after you attach. In addition, the Suppress JIT optimization on module load option does not affect modules, such as WinForms.dll, that are created with NGEN.

Consulte também

Tarefas

Como: Basta entrar meu código.

Conceitos

Processo de Execução Gerenciada

Outros recursos

Depurando código gerenciado

Anexando a processos em execução