Merge pull request #142 from puremourning/tweaks

Tweaks
This commit is contained in:
mergify[bot] 2020-04-01 16:03:27 +00:00 committed by GitHub
commit 7e29143a6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 {} )