fix(debugger): echo the Java launch command in the debug console (#2930)

Java Debug launches through java-debug in jdtls, which bypasses the Run process that echoes its command line. Debug now prints the equivalent java … -cp … Main … command after the build and classpath resolution, so Debug and Run output stay comparable.

Co-authored-by: kradme <17811095+kradme@users.noreply.github.com>
This commit is contained in:
langxp
2026-11-12 19:03:38 +08:00
committed by GitHub
co-authored by kradme
parent 2e044c4a2b
commit bc00302ef8
2 changed files with 15 additions and 0 deletions
+3
View File
@@ -139,6 +139,9 @@ export async function javaLaunchConfig(
const classPaths = parsed.explicitClasspath
? parsed.explicitClasspath.split(info.pathListSeparator)
: info.classPaths;
// java-debug starts the JVM itself, bypassing the Run process that echoes its
// command line. Echo the equivalent launch here so Debug and Run stay comparable.
preparation?.report?.(`${joinJavaArgs([resolved.command, ...resolved.args])}\n`);
if (kotlin) {
return {
name: rc.name,