Ensure the handler runs by setting it before killing the job. The callback must be being called syncronously if the process terminates immediately
This commit is contained in:
parent
0b7915e0d9
commit
5076c62ed2
1 changed files with 4 additions and 4 deletions
|
|
@ -452,14 +452,14 @@ class DebugSession( object ):
|
|||
|
||||
def _StopDebugAdapter( self, callback = None ):
|
||||
def handler( *args ):
|
||||
vim.eval( 'vimspector#internal#{}#StopDebugSession()'.format(
|
||||
self._connection_type ) )
|
||||
|
||||
if callback:
|
||||
self._logger.debug( "Setting server exit handler for disconnect" )
|
||||
self._logger.debug( "Setting server exit handler before disconnect" )
|
||||
assert not self._run_on_server_exit
|
||||
self._run_on_server_exit = callback
|
||||
|
||||
vim.eval( 'vimspector#internal#{}#StopDebugSession()'.format(
|
||||
self._connection_type ) )
|
||||
|
||||
arguments = {}
|
||||
if self._server_capabilities.get( 'supportTerminateDebuggee' ):
|
||||
arguments[ 'terminateDebugee' ] = True
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue