The chrome debugger doesn't return 'line' in some stack frames. Fix a bug for expensive scopes

This commit is contained in:
Ben Jackson 2019-10-06 21:56:36 +01:00
commit 63f8543d8f
4 changed files with 30 additions and 9 deletions

View file

@ -73,7 +73,15 @@ class CodeView( object ):
return False
# SIC: column is 0-based, line is 1-based in vim. Why? Nobody knows.
self._window.cursor = ( frame[ 'line' ], frame[ 'column' ] - 1 )
try:
self._window.cursor = ( frame[ 'line' ], frame[ 'column' ] - 1 )
except vim.error:
self._logger.exception( "Unable to jump to %s:%s in %s, maybe the file "
"doesn't exist",
frame[ 'line' ],
frame[ 'column' ],
frame[ 'source' ][ 'path' ] )
return False
self._signs[ 'vimspectorPC' ] = self._next_sign_id
self._next_sign_id += 1