Bluehorn Bluehorn - 4 months ago 28
Java Question

Default VM arguments in Eclipse debug configuration?

When I implement new features using TDD, I often use the shortcut

Shift + Alt + D T
to run only the jUnit test case I am currently working on (and not the whole test suite, which takes a few minutes).

This creates a new Debug Configuration for the current Java source and runs it immediately. Now I would like to run the test with assertions enabled (VM option

Unfortunately, the VM arguments for the new debug configuration starts empty. I always have to go into
Debug Configurations...
and add
to the VM arguments input box.

Is there any way to have Eclipse these arguments populated with (project or workspace wide) default options?


WindowsPreferencesJUnit has an option to add -ea every time a new launch configuration is created. It adds the -ea option to the Debug Configuration as well.

The full text next to a check box is:

Add -ea to VM arguments when creating a new JUnit launch configuration