intellij run vs debug配置有不同的args输入参数

时间:2016-02-26 22:34:04

标签: java configuration intellij-15

Intellij 15.0.3
主类:xxx.project.Boot
VM args:-cp xxx.jar -Dxxx.work.dir = yyy xxx.project.Boot
程序参数:dump_args

项目代码

public static void main (String[] args) Throwable {
   // first line in the Main entry point of the program
   for (int i = 0; i < args.length; i++){
      System.out.println("args["+i+"] = "+args[i]);
   }
   ...
}

运行输出:

args[0] = -Didea.launcher.port=7536
args[1] = -Didea.launcher.bin.path=/home/dev/Software/idea-IU-143.1821.5/bin
args[2] = -Dfile.encoding=UTF-8
args[3] = com.intellij.rt.execution.application.AppMain
args[4] = xxx.project.Boot
args[5] = dump_args

调试输出:

args[0] = -Dfile.encoding=UTF-8
args[1] = xxx.project.Boot
args[2] = dump_args

我尝试过无效缓存并重启Intellj。在这种情况下的行为不会改变。当我尝试使用相同的代码创建另一个入口点时,行为是预期的。如何调试此类配置问题?

0 个答案:

没有答案