From 41b12c130cc658aa7d4aa87cb2d8e50434d473f7 Mon Sep 17 00:00:00 2001 From: Bruno Borges Date: Fri, 30 Aug 2019 14:02:37 -0700 Subject: [PATCH] Don't inject classpath into modulePaths config It is OK to leave modulePaths empty. What is not OK is to inject the classPaths into modulePaths. --- src/configurationProvider.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/configurationProvider.ts b/src/configurationProvider.ts index 5675aa82..e50688a6 100644 --- a/src/configurationProvider.ts +++ b/src/configurationProvider.ts @@ -191,11 +191,11 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration config.mainClass = mainClassOption.mainClass; config.projectName = mainClassOption.projectName; - if (_.isEmpty(config.classPaths) && _.isEmpty(config.modulePaths)) { + if (_.isEmpty(config.classPaths)) { const result = (await lsPlugin.resolveClasspath(config.mainClass, config.projectName)); - config.modulePaths = result[0]; config.classPaths = result[1]; } + if (_.isEmpty(config.classPaths) && _.isEmpty(config.modulePaths)) { throw new utility.UserError({ message: "Cannot resolve the modulepaths/classpaths automatically, please specify the value in the launch.json.",