Skip to content

Commit cc76045

Browse files
committed
switch to warning if launch.json missing version (microsoft#650)
1 parent c1ba1c5 commit cc76045

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/extension/debugger/configuration/launch.json/launchJsonReader.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as fs from 'fs-extra';
66
import { parse } from 'jsonc-parser';
77
import { DebugConfiguration, Uri, WorkspaceFolder } from 'vscode';
88
import { getConfiguration, getWorkspaceFolder } from '../../../common/vscodeapi';
9-
import { traceLog } from '../../../common/log/logging';
9+
import { traceError, traceLog, traceWarn } from '../../../common/log/logging';
1010

1111
export async function getConfigurationsForWorkspace(workspace: WorkspaceFolder): Promise<DebugConfiguration[]> {
1212
traceLog('Getting configurations for workspace');
@@ -23,10 +23,11 @@ export async function getConfigurationsForWorkspace(workspace: WorkspaceFolder):
2323
}
2424
// configurations found in launch.json, verify them then return
2525
if (!Array.isArray(parsed.configurations) || parsed.configurations.length === 0) {
26+
traceError('Invalid configurations in launch.json');
2627
throw Error('Invalid configurations in launch.json');
2728
}
2829
if (!parsed.version) {
29-
throw Error('Missing field in launch.json: version');
30+
traceWarn('Missing field in launch.json: version');
3031
}
3132
traceLog('Using configuration in launch.json');
3233
return parsed.configurations;

0 commit comments

Comments
 (0)