jk *_*ies 6 java debugging visual-studio-code
我试图在 Visual Studio 代码中将多个参数传递给我的测试 java 程序:
public class test{
public static void main(String[] args) {
String x = args[0]
//String x = args[0] + arg[1];
System.out.println(x);
}
}
Run Code Online (Sandbox Code Playgroud)
如果我在 launch.json 中使用 1 个参数,则它可以工作:
{
"type": "java",
"name": "Debug (Launch)",
"request": "launch",
"cwd": "${workspaceFolder}",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "",
"args": "bla"
}
Run Code Online (Sandbox Code Playgroud)
但是如果我想放 2 个参数,那么它不起作用。在我的 launch.json 中尝试了几种组合:
"args": ["bla","bla"],
"args": "bla" "bla",
"args": "['bla','bla']"
Run Code Online (Sandbox Code Playgroud)
但是看起来调试器正在挂起。
提前致谢。
归档时间: |
|
查看次数: |
11591 次 |
最近记录: |