Pass parameters when debugging vscode java. [Note] Not limited to java language, but add the following items to the vscode debug configuration file (*** args **).
launch.json
{
"type": "java",
"name": "Debug (Launch) - Current File",
"request": "launch",
"mainClass": "${file}",
"args": [
"AIUEO",
"Kakikukeko"
]
},
Try below
demojava/demo4/Parameter.java
package demojava.demo4;
public class Parameter {
public static void main(String[] args) {
System.out.println(args[0] + "::" + args[1] );
}
}
Result of trying
Recommended Posts