-
Notifications
You must be signed in to change notification settings - Fork 379
Description
Class path wildcards are officially an option in Java: https://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html
Specifying target/dependency/* as a class path option is common practice and highly suggested as a method of collecting .m2 jars. See https://stackoverflow.com/a/6079820/8652920
Therefore, this functionality should be easily accessible when specifying classpaths in launch.json
. This is not the case, however, and asterisks seem to be prematurely escaped.
Environment
- Operating System: Linux x64
- JDK version: openjdk version "17.0.12" 2024-07-16
- Visual Studio Code version: 1.85.2
- Java extension version: v22.1.1
- Java Debugger extension version: v0.58.0
Steps To Reproduce
- Create a "java" launch configuration (if you're not sure how, ref https://stackoverflow.com/questions/63711388/how-do-i-provide-launch-option-args-to-vscode-java-debugger) with the "classPaths" option specified, and add the path "$project_src/target/dependency/*"
- Specify
"shortenCommandLine": "none"
to see the full command in terminal - Run and debug, and examine the
-cp
value generated by this extension - You will see
target/dependency/\*
Current Result
cd /path/to/maven/project ; /usr/bin/env /usr/lib/jvm/java-17-openjdk-amd64/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:45743 -DconfigFile=src/main/resources/properties/config.properties -Dno_system_volume=true -XX:+ShowCodeDetailsInExceptionMessages -cp /path/to/maven/project/target/dependency/\* com.my.project.Main
Expected Result
cd /path/to/maven/project ; /usr/bin/env /usr/lib/jvm/java-17-openjdk-amd64/bin/java -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:45743 -DconfigFile=src/main/resources/properties/config.properties -Dno_system_volume=true -XX:+ShowCodeDetailsInExceptionMessages -cp /path/to/maven/project/target/dependency/* com.my.project.Main