Pass parameters when debugging vscode java. [Note]

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 2020-10-10_14-30-24.png

Recommended Posts

Pass parameters when debugging vscode java. [Note]
Java SE 8 Silver (Java SE 8 Programmer I) Pass Note
A note when you want Tuple in Java
Java abstract modifier [Note]
[Java] Internal Iterator Note
Java JUnit brief note
[java] Java SE 8 Silver Note
[Note] Java: String search
[Note] Java: String survey
[Java] Arguments and parameters
My Study Note (Java)
java: Add date [Note]
[Java] Precautions when converting variable-length argument parameters into an array