help with classpath #1070
-
i have a maven/java project. i want to debug the app and load a specific properties file. when i run with a barebones launch.json file, it starts and immediately dies, because it cant find the property file. seems to autogenerate a jar file to load, however, i have no idea whats in the jar file, and i cant even locate it. does it delete this jar file when the debugger ends? and how is it even generating this path/jar? does it generate this jar from my maven pom.xml ? when i add a classpath into my launch.json file, like this:
i see this reflected properly in the terminal
however, of course i need to add the path to the java files , so i add this to my launch.json but then the terminal goes back to the autogenerated classpath (?!)
im running VSCode Version: 1.62.0 is this a maven issue? not sure why the debugger is behaving this way. doesnt seem to be documented in https://code.visualstudio.com/docs/java/java-debugging |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Since some terminals (such as cmd) have a limit on the max length of a command line, the debugger will generate the classpath args into a tmp file by default to shorten the length of the command line. That's why you see a tmp jar file cp_xyz.jar being passed as classpath. It's generate based on the classpath of your pom.xml'. You could turn off the tmp file by adding a config If you want to manually configure |
Beta Was this translation helpful? Give feedback.
Since some terminals (such as cmd) have a limit on the max length of a command line, the debugger will generate the classpath args into a tmp file by default to shorten the length of the command line. That's why you see a tmp jar file cp_xyz.jar being passed as classpath. It's generate based on the classpath of your pom.xml'. You could turn off the tmp file by adding a config
"shortenCommandLine": "none"
to launch.json.If you want to manually configure
classPaths
parameter in launch.json, you could refer to #93 (comment).