Skip to content

Commit 447d2df

Browse files
resolveDebugConfiguration returns null to tell vscode to continue generating launch.json (#430)
* resolveDebugConfiguration returns null to tell vscode to continue generating launch.json Signed-off-by: Jinbo Wang <[email protected]> * Use truthy to check the value is empty or not
1 parent 7dc2273 commit 447d2df

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/configurationProvider.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,12 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
135135
* If no launch.json exists in the current workspace folder
136136
* delegate to provideDebugConfigurations api to generate the initial launch.json configurations
137137
*/
138-
if (this.isEmptyConfig(config) && folder !== undefined) {
139-
return config;
138+
if (this.isEmptyConfig(config) && folder) {
139+
// Follow the feature request https://github.com/Microsoft/vscode/issues/54213#issuecomment-420965778,
140+
// in order to generate launch.json, the resolveDebugConfiguration api must return null explicitly.
141+
return null;
140142
}
143+
141144
// If it's the single file case that no workspace folder is opened, generate debug config in memory
142145
if (this.isEmptyConfig(config) && !folder) {
143146
config.type = "java";

0 commit comments

Comments
 (0)