Um atalho de teclado no VS2005/8 para “Saída de método atual”
-
03-07-2019 - |
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).
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:
Ctrl+M, Ctrl+M
(Edit.ToggleOutliningExpansion: collapses the current method)Right arrow
(skips past the collapsed parameter list)Ctrl+]
(Edit.GotoBrace: goes to the opening brace)Ctrl+]
(Edit.GotoBrace: goes to the closing brace)Ctrl+Shift+F10
(Debug.SetNextStatement: sets the next statement to the closing brace at the end of the function)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