Add ClearBreakpoints API
Add a test which actually triggers the mappings and fires up vimspector with the cpptools debugger.
This commit is contained in:
parent
e10a13e758
commit
470c64603a
11 changed files with 155 additions and 19 deletions
|
|
@ -29,10 +29,10 @@ class ProjectBreakpoints( object ):
|
|||
# These are the user-entered breakpoints.
|
||||
self._line_breakpoints = defaultdict( list )
|
||||
self._func_breakpoints = []
|
||||
self._exceptionBreakpoints = None
|
||||
|
||||
# FIXME: Remove this. Remove breakpoints nonesense from code.py
|
||||
self._breakpoints_handler = None
|
||||
self._exceptionBreakpoints = None
|
||||
self._server_capabilities = {}
|
||||
|
||||
self._next_sign_id = 1
|
||||
|
|
@ -92,6 +92,14 @@ class ProjectBreakpoints( object ):
|
|||
|
||||
vim.eval( 'setqflist( {} )'.format( json.dumps( qf ) ) )
|
||||
|
||||
def ClearBreakpoints( self ):
|
||||
# These are the user-entered breakpoints.
|
||||
self._line_breakpoints = defaultdict( list )
|
||||
self._func_breakpoints = []
|
||||
self._exceptionBreakpoints = None
|
||||
|
||||
self.UpdateUI()
|
||||
|
||||
def ToggleBreakpoint( self ):
|
||||
line, column = vim.current.window.cursor
|
||||
file_name = vim.current.buffer.name
|
||||
|
|
@ -211,6 +219,7 @@ class ProjectBreakpoints( object ):
|
|||
}
|
||||
)
|
||||
|
||||
|
||||
def _SetUpExceptionBreakpoints( self ):
|
||||
exceptionBreakpointFilters = self._server_capabilities.get(
|
||||
'exceptionBreakpointFilters',
|
||||
|
|
|
|||
|
|
@ -724,5 +724,8 @@ class DebugSession( object ):
|
|||
def ToggleBreakpoint( self ):
|
||||
return self._breakpoints.ToggleBreakpoint()
|
||||
|
||||
def ClearBreakpoints( self ):
|
||||
return self._breakpoints.ClearBreakpoints()
|
||||
|
||||
def AddFunctionBreakpoint( self, function ):
|
||||
return self._breakpoints.AddFunctionBreakpoint( function )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue