intellij run vs debug configuration has different args input parameter

352 Views Asked by At

Intellij 15.0.3
Main class: xxx.project.Boot
VM args: -cp xxx.jar -Dxxx.work.dir=yyy xxx.project.Boot
Program arguments: dump_args

Project Code

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]);
   }
   ...
}

Run output:

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

Debug output:

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

I have tried to invalid cache and restart Intellj. The behavior in this case does not change. When I tried to create another entry point using the same code, the behavior is as expected. How can I debug this type of configuration problem?

0

There are 0 best solutions below