Calva does not have configuration designed for setting Java options. That doesn't mean you don't have options, though. First some general background:
You can provide these via :jvm-opts
on an alias in deps.edn
, or via the environment variable JAVA_TOOL_OPTIONS
. Something like this would be an equivalent command line invokation (assuming something Unix-like):
JAVA_TOOL_OPTIONS='-Dtrace -Dguardrails.enabled=true' clj -A:dev
You then can use the command Calva: Copy Jack-in Command Line to Clipboard, to get the REPL started in a Calva compliant way, then use Calva: Connect to a Running REPL in your Project, to connect to it.
However, you can also use Jack-in. Calva has a settings calva.jackInEnv
, where you can provide this environment variable, and Jack-in should work.
Yet another, Jack-in compatible, option is to add this in your deps.edn
. Something like:
:aliases {:dev {:jvm-opts ["-Dtrace" "-Dguardrails.enabled=true"]}}
You could then specify the :dev
alias at Calva Jack-in.
I think I would go with the last one, as it makes the project config portable and easy for others to use.
Hoping this helps! Here is an article about Calva Jack-in that probably is good to read.