Disable/remove child Breakpoints?

前端 未结 3 550
猫巷女王i
猫巷女王i 2020-12-11 02:40

I\'m debugging an ASP.NET Website with C# in Visual Studio. When I set a breakpoint (during debug), over time, the created breakpoint will accumulate many child breakpoints.

3条回答
  •  我在风中等你
    2020-12-11 03:01

    The following code can be used as a macro to remove all the child breakpoints.

    Sub RemoveChildBreakpoints()
        Dim i As Integer
        Dim len As Integer
        Dim debugger As EnvDTE.Debugger = DTE.Debugger
        Dim children As EnvDTE.Breakpoints
        For Each bp As EnvDTE.Breakpoint In debugger.Breakpoints
            children = bp.Children
            len = children.Count
            For i = len To 1 Step -1
                children.Item(i).Delete()
            Next
        Next
    End Sub
    

    It's still insanely slow if you have many breakpoints, so it's best to do run it on a regular basis if you're having a problem with child breakpoints.

提交回复
热议问题