Default VM arguments in Eclipse debug configuration?

前端 未结 3 559
迷失自我
迷失自我 2021-02-12 20:27

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 tes

相关标签:
3条回答
  • 2021-02-12 20:55

    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

    0 讨论(0)
  • 2021-02-12 21:11

    Only way I can see to do it is to contribute a new launch configuration, this is not a trivial task but not too hard if you have PDE experience.

    There is an eclipse.org article (see "Creating a Launch Configuration") that describes how to construct configurations and launch them.

    I guess you could copy the JUnit implementation (see the org.eclipse.debug.core.launchConfigurationTypes extension in org.eclipse.jdt.junit) and add in your chosen defaults to that config. You'd then need to declare a key binding to launch it and package the plugin to your install.

    0 讨论(0)
  • 2021-02-12 21:13

    I think you can set this option by editing the definition of the JRE under PreferencesJavaInstalled JREs → Select the JRE in question and edit the default VM arguments

    0 讨论(0)
提交回复
热议问题