Pergunta

Ao depurar, um truque que faço sempre que quero sair do método atual sem executar suas instruções, movo o ponteiro de execução atual para o final do método e clique em F10/11.

Existe um atalho de teclado (ou posso programar um) para fazer isso?

(Não quero dizer Shift -F11 (Evite) - que executa todo o código até o final do método, o que eu não quero).

Foi útil?

Solução

The following sequence of keystrokes works for me (tested in Visual Studio 2008); I was able to record them as a temporary macro and play them back successfully:

  1. Ctrl+M, Ctrl+M (Edit.ToggleOutliningExpansion: collapses the current method)
  2. Right arrow (skips past the collapsed parameter list)
  3. Ctrl+] (Edit.GotoBrace: goes to the opening brace)
  4. Ctrl+] (Edit.GotoBrace: goes to the closing brace)
  5. Ctrl+Shift+F10 (Debug.SetNextStatement: sets the next statement to the closing brace at the end of the function)
  6. F10 (Debug.StepOver: leaves the method)

Outras dicas

AFAIK that's the only way to do it.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top