diff --git a/org.eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/node/VSCodeJSDebugDelegate.java b/org.eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/node/VSCodeJSDebugDelegate.java index 1bb774e55d..a63e3b838f 100644 --- a/org.eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/node/VSCodeJSDebugDelegate.java +++ b/org.eclipse.wildwebdeveloper/src/org/eclipse/wildwebdeveloper/debug/node/VSCodeJSDebugDelegate.java @@ -271,8 +271,9 @@ protected boolean configureAdditionalParameters(ILaunchConfiguration config, Map boolean outDirOrFileIsSet = false; String outDir = co.get(OUT_DIR) instanceof String o ? o.trim() : null; + File outDirFile = parentDirectory; if (outDir != null && outDir.length() > 0 && !".".equals(outDir) && !"./".equals(outDir)) { - File outDirFile = new File(parentDirectory, outDir); + outDirFile = new File(parentDirectory, outDir); try { outDir = outDirFile.getCanonicalPath(); } catch (IOException e) { @@ -287,8 +288,9 @@ protected boolean configureAdditionalParameters(ILaunchConfiguration config, Map param.put("rootPath", tsConfigFile.getParentFile().getAbsolutePath()); String rootDir = co.get(ROOT_DIR) instanceof String o ? o.trim() : null; + File rootDirFile = parentDirectory; if (rootDir != null && rootDir.length() > 0 && !".".equals(outDir) && !"./".equals(outDir)) { - File rootDirFile = new File(parentDirectory, rootDir); + rootDirFile = new File(parentDirectory, rootDir); try { rootDir = rootDirFile.getCanonicalPath(); } catch (IOException e) { @@ -298,6 +300,8 @@ protected boolean configureAdditionalParameters(ILaunchConfiguration config, Map param.put(ROOT_DIR, rootDir); param.put("rootPath", rootDir); } + Path jsFile = outDirFile.toPath().resolve(rootDirFile.toPath().relativize(programFile.toPath().getParent().resolve(toJS(programFile.getName())))); + param.put("program", jsFile.toString()); if (!outDirOrFileIsSet && errorMessage == null) { errorMessage = Messages.NodeDebug_TSConfigError_OutDirIsNotSet;