@@ -20,11 +20,7 @@ export async function getConfigurationsForWorkspace(workspace: WorkspaceFolder):
2020 // no launch.json or no configurations found in launch.json, look in settings.json
2121 if ( ! parsed || ! parsed . configurations ) {
2222 traceLog ( 'No configurations found in launch.json, looking in settings.json.' ) ;
23- const settingConfigs = getConfigurationsFromSettings ( workspace ) ;
24- if ( settingConfigs . length === 0 ) {
25- throw Error ( 'No configurations found in launch.json or settings.json' ) ;
26- }
27- return Promise . resolve ( settingConfigs ) ;
23+ return getConfigurationsFromSettings ( workspace ) ;
2824 }
2925 // configurations found in launch.json, verify them then return
3026 if ( ! Array . isArray ( parsed . configurations ) || parsed . configurations . length === 0 ) {
@@ -51,8 +47,12 @@ export function getConfigurationsFromSettings(workspace: WorkspaceFolder): Debug
5147 // look in settings.json
5248 const codeWorkspaceConfig = getConfiguration ( 'launch' , workspace ) ;
5349 // if this includes user configs, how do I make sure it selects the workspace ones first
54- if ( ! codeWorkspaceConfig . configurations || ! Array . isArray ( codeWorkspaceConfig . configurations ) ) {
55- return [ ] ;
50+ if (
51+ ! codeWorkspaceConfig . configurations ||
52+ ! Array . isArray ( codeWorkspaceConfig . configurations ) ||
53+ codeWorkspaceConfig . configurations . length === 0
54+ ) {
55+ throw Error ( 'No configurations found in launch.json or settings.json' ) ;
5656 }
5757 traceLog ( 'Using configuration in workspace settings.json.' ) ;
5858 return codeWorkspaceConfig . configurations ;
0 commit comments