Skip to content

Commit 6079973

Browse files
authored
Merge pull request #266 from Achal1607/javavscode-148
Correctly pick configuration from launch settings during run and debug sessions
2 parents d6147c3 + 13bbb7b commit 6079973

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vscode/src/extension.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,13 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
612612
}));
613613

614614
async function findRunConfiguration(uri : vscode.Uri) : Promise<vscode.DebugConfiguration|undefined> {
615-
// do not invoke debug start with no (java+) configurations, as it would probably create an user prompt
615+
// do not invoke debug start with no (jdk) configurations, as it would probably create an user prompt
616616
let cfg = vscode.workspace.getConfiguration("launch");
617617
let c = cfg.get('configurations');
618618
if (!Array.isArray(c)) {
619619
return undefined;
620620
}
621-
let f = c.filter((v) => v['type'] === 'java+');
621+
let f = c.filter((v) => v['type'] === 'jdk');
622622
if (!f.length) {
623623
return undefined;
624624
}
@@ -631,10 +631,10 @@ export function activate(context: ExtensionContext): VSNetBeansAPI {
631631
}
632632
}
633633
let provider = new P();
634-
let d = vscode.debug.registerDebugConfigurationProvider('java+', provider);
634+
let d = vscode.debug.registerDebugConfigurationProvider('jdk', provider);
635635
// let vscode to select a debug config
636636
return await vscode.commands.executeCommand('workbench.action.debug.start', { config: {
637-
type: 'java+',
637+
type: 'jdk',
638638
mainClass: uri.toString()
639639
}, noDebug: true}).then((v) => {
640640
d.dispose();

0 commit comments

Comments
 (0)