Handle failed breakpoint messages
This commit is contained in:
parent
d950352545
commit
8bb7017a49
1 changed files with 13 additions and 6 deletions
|
|
@ -203,14 +203,18 @@ class ProjectBreakpoints( object ):
|
|||
|
||||
awaiting = 0
|
||||
|
||||
def response_handler( source, msg ):
|
||||
if msg:
|
||||
self._breakpoints_handler.AddBreakpoints( source, msg )
|
||||
def response_received():
|
||||
nonlocal awaiting
|
||||
awaiting = awaiting - 1
|
||||
if awaiting == 0 and doneHandler:
|
||||
doneHandler()
|
||||
|
||||
def response_handler( source, msg ):
|
||||
if msg:
|
||||
self._breakpoints_handler.AddBreakpoints( source, msg )
|
||||
response_received()
|
||||
|
||||
|
||||
|
||||
# TODO: add the _configured_breakpoints to line_breakpoints
|
||||
# TODO: the line numbers might have changed since pressing the F9 key!
|
||||
|
|
@ -244,7 +248,8 @@ class ProjectBreakpoints( object ):
|
|||
'breakpoints': breakpoints,
|
||||
},
|
||||
'sourceModified': False, # TODO: We can actually check this
|
||||
}
|
||||
},
|
||||
failure_handler = lambda *_: response_received()
|
||||
)
|
||||
|
||||
# TODO: Add the _configured_breakpoints to function breakpoints
|
||||
|
|
@ -261,7 +266,8 @@ class ProjectBreakpoints( object ):
|
|||
for bp in self._func_breakpoints if bp[ 'state' ] == 'ENABLED'
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
failure_handler = lambda *_: response_received()
|
||||
)
|
||||
|
||||
if self._exception_breakpoints is None:
|
||||
|
|
@ -274,7 +280,8 @@ class ProjectBreakpoints( object ):
|
|||
{
|
||||
'command': 'setExceptionBreakpoints',
|
||||
'arguments': self._exception_breakpoints
|
||||
}
|
||||
},
|
||||
failure_handler = lambda *_: response_received()
|
||||
)
|
||||
|
||||
if awaiting == 0 and doneHandler:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue