Can I set breakpoints to all methods in a class at once in Visual Studio?

前端 未结 6 1883
盖世英雄少女心
盖世英雄少女心 2020-12-28 13:06

I have 40-50 methods in a class, I want to add breakpoints to all of them. Can I add breakpoints to all of them at once?

6条回答
  •  情书的邮戳
    2020-12-28 13:41

    If you use vim (vsvim) you can manipulate breakpoints fairly easily. Here are some examples.

    break on every line:{Escape}qq:vsc Debug.ToggleBreakpoint{Enter}jq100@q

    break on every method:

    {Escape}qq:vsc Edit.NextMethod{Enter}:vsc Debug.ToggleBreakpoint{Enter}jq100@q

    replace the 100 with the appropriate number of lines/methods.

    example: https://imgur.com/SFhlEr7

提交回复
热议问题