How to add JAVA_OPTS to a *Debug* configuration?

This probably occurs for any debug configuration, but I found it while working with a Tomcat debug config.

When I'm running Tomcat, I need to specify additional JAVA_OPTS (namely "-Dhttp.proxySet=true -Dhttp.proxyHost=proxy.mycompany.com")

However, there is no way to specify these when I debug Tomcat within IDEA.

The Environment Variables for Tomcat within IDEA, has a READ-ONLY JAVA_OPTS field that is used to setup the debug options.

Is there anyway this field could be made modifiable so we can add more JAVA_OPTS? or at the very least, could it be outside the user-specified Environment variables, and contain a reference to already existing JAVA_OPTS variable?
i.e. %JAVA_OPTS% -Xdebug -Xnoagent -Djava.compiler=NONE .....

4 comments
Comment actions Permalink

Just add the options to the field "VM parameters". You can enter any valid VM argument (-D, -X, etc.) there and IDEA will automatically put them into the JAVA_OPTS environment variable. That's also the reason why it doesn't let you edit the variable itself.

Sascha

0
Comment actions Permalink

thanks. I didn't realize that.

0
Comment actions Permalink

Sascha Weinreuter wrote:

Just add the options to the field "VM parameters". You can enter any valid VM argument (-D, -X, etc.) there and IDEA will automatically put them into the JAVA_OPTS environment variable. That's also the reason why it doesn't let you edit the variable itself.


Another way is to use the CATALINA_OPTS variable
instead of the JAVA_OPTS variable.

Regards,
Jens

0
Comment actions Permalink

I want to create a custom tomcat debug start/shutdown scripts - but I can't copy the content of the defaults. Is there any way to copy it?

0

Please sign in to leave a comment.