Breakpoints returned from servers rarely have source set
For line-breakpoints we already know it, so just use what we said originally. For method breakpoints, we have no clue. While some servers return a line, it could be in any file, so we just ignore them.
This commit is contained in:
parent
d814091692
commit
9d9c2214f3
2 changed files with 18 additions and 16 deletions
|
|
@ -85,17 +85,17 @@ class CodeView( object ):
|
|||
self._signs[ 'vimspectorPC' ] = None
|
||||
|
||||
|
||||
def AddBreakpoints( self, breakpoints ):
|
||||
def AddBreakpoints( self, source, breakpoints ):
|
||||
for breakpoint in breakpoints:
|
||||
if not breakpoint.get( 'verified', False ):
|
||||
continue
|
||||
|
||||
if 'source' not in breakpoint:
|
||||
self._logger.warn( 'source not in breakpoint {0}'.format(
|
||||
json.dumps( breakpoint ) ) )
|
||||
continue
|
||||
if source:
|
||||
breakpoint[ 'source' ] = source
|
||||
else:
|
||||
self._logger.warn( 'missing source in breakpoint {0}'.format(
|
||||
json.dumps( breakpoint ) ) )
|
||||
continue
|
||||
|
||||
self._breakpoints[ breakpoint[ 'source' ][ 'file' ] ].append(
|
||||
self._breakpoints[ breakpoint[ 'source' ][ 'path' ] ].append(
|
||||
breakpoint )
|
||||
|
||||
self._logger.debug( 'Breakpoints at this point: {0}'.format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue