Allow selecting a specific launch config on LaunchWithSettings

This commit is contained in:
Ben Jackson 2019-10-18 22:21:38 +01:00
commit 12df3c53a2
2 changed files with 4 additions and 2 deletions

View file

@ -94,7 +94,9 @@ class DebugSession( object ):
adapters.update( database.get( 'adapters' ) or {} )
if len( configurations ) == 1:
if 'configuration' in launch_variables:
configuration_name = launch_variables.pop( 'configuration' )
elif len( configurations ) == 1:
configuration_name = next( iter( configurations.keys() ) )
else:
configuration_name = utils.SelectFromList(

View file

@ -34,7 +34,7 @@ with patch( 'vimspector.utils.SelectFromList',
return_value=None ) as p:
with patch( 'vimspector.utils.AskForInput',
return_value=None ) as p:
vim.eval( 'feedkeys( "\<F5>", "xt" )' )
vim.eval( 'vimspector#LaunchWithSettings( { "configuration": "run" } )' )
vim.eval( 'vimspector#test#signs#AssertCursorIsAtLineInBuffer( fn, 6, 1 )' )
p.assert_called()
EOF