diff --git a/python3/vimspector/debug_session.py b/python3/vimspector/debug_session.py index 064b410..1abd99a 100644 --- a/python3/vimspector/debug_session.py +++ b/python3/vimspector/debug_session.py @@ -120,7 +120,8 @@ class DebugSession( object ): if 'configuration' in launch_variables: configuration_name = launch_variables.pop( 'configuration' ) - elif len( configurations ) == 1: + elif ( len( configurations ) == 1 and + next( iter( configurations.values() ) ).get( "autoselect", True ) ): configuration_name = next( iter( configurations.keys() ) ) else: configuration_name = utils.SelectFromList( @@ -591,7 +592,8 @@ class DebugSession( object ): arguments = {} if self._server_capabilities.get( 'supportTerminateDebuggee' ): - arguments[ 'terminateDebugee' ] = True + # If we attached, we should _not_ terminate the debuggee + arguments[ 'terminateDebuggee' ] = False self._connection.DoRequest( handler, { 'command': 'disconnect', @@ -843,6 +845,10 @@ class DebugSession( object ): self._stackTraceView.LoadThreads( True ) + def OnEvent_loadedSource( self, msg ): + pass + + def OnEvent_capabilities( self, msg ): self._server_capabilities.update( ( msg.get( 'body' ) or {} ).get( 'capabilities' ) or {} )