Start to refactor breakpoints into different types

This basically stores line breakpoints as a map by file name. Soon to
come: function breakpoints and others.
This commit is contained in:
Ben Jackson 2018-05-28 19:11:29 +01:00
commit 9baea25c46
5 changed files with 48 additions and 37 deletions

View file

@ -104,6 +104,8 @@ class CodeView( object ):
self._logger.debug( 'Breakpoints at this point: {0}'.format(
json.dumps( self._breakpoints, indent = 2 ) ) )
self.ShowBreakpoints()
def UpdateBreakpoint( self, bp ):
if 'id' not in bp:
self.AddBreakpoints( None, [ bp ] )
@ -112,6 +114,7 @@ class CodeView( object ):
for index, breakpoint in enumerate( breakpoint_list ):
if 'id' in breakpoint and breakpoint[ 'id' ] == bp[ 'id' ]:
breakpoint_list[ index ] = bp
self.ShowBreakpoints()
return
# Not found. Assume new