Try and work out why the server exit handler isn't called
This commit is contained in:
parent
6f9fe0cd6f
commit
3edd1589c3
2 changed files with 9 additions and 2 deletions
|
|
@ -744,6 +744,8 @@ class DebugSession( object ):
|
|||
self._variablesView.Clear()
|
||||
|
||||
def OnServerExit( self, status ):
|
||||
self._logger.info( "The server has terminated with status %s",
|
||||
status )
|
||||
self.Clear()
|
||||
|
||||
self._connection.Reset()
|
||||
|
|
@ -759,7 +761,7 @@ class DebugSession( object ):
|
|||
|
||||
def OnEvent_terminated( self, message ):
|
||||
# We will handle this when the server actually exists
|
||||
utils.UserMessage( "Debugging was terminated." )
|
||||
utils.UserMessage( "Debugging was terminated by the server." )
|
||||
|
||||
def OnEvent_output( self, message ):
|
||||
if self._outputView:
|
||||
|
|
|
|||
|
|
@ -227,6 +227,11 @@ def Escape( msg ):
|
|||
|
||||
|
||||
def UserMessage( msg, persist=False ):
|
||||
if persist:
|
||||
_logger.warning( 'User Msg: ' + msg )
|
||||
else:
|
||||
_logger.info( 'User Msg: ' + msg )
|
||||
|
||||
vim.command( 'redraw' )
|
||||
cmd = 'echom' if persist else 'echo'
|
||||
for line in msg.split( '\n' ):
|
||||
|
|
@ -283,7 +288,7 @@ def AppendToBuffer( buf, line_or_lines, modified=False ):
|
|||
except Exception:
|
||||
# There seem to be a lot of Vim bugs that lead to E315, whose help says that
|
||||
# this is an internal error. Ignore the error, but write a trace to the log.
|
||||
logging.getLogger( __name__ ).exception(
|
||||
_logger.exception(
|
||||
'Internal error while updating buffer %s (%s)', buf.name, buf.number )
|
||||
finally:
|
||||
if not modified:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue