Is your feature request related to a problem? Please describe.
When I run/debug application during development in many occasions I need to override system properties.
Describe the solution you'd like
It would be great if run configuration will support vmArgs and env the same way as java extension https://code.visualstudio.com/docs/java/java-debugging
Thanks for reporting! We are actually working on the environmental variables, however you should already be able to change the jvm arguments via for example config like:
{
"type": "scala",
"name": "Main",
"request": "launch",
"mainClass": "com.example.Main",
"args": [],
"jvmOptions": ["-J-Xmx4G"]
}
it currently needs -J added, but we will later add that automatically.
I have stumpfet about the env issue as well. Prevents me from using Metals in Vscode
I also have a use case where I'd like to be able to point to (or automatically apply) an existing .env file (just like you can do in Python) in the launch.json config.
I tend to use the mefellows/sbt-dotenv plugin to do this in sbt and IntelliJ has the EnvFile plugin which allows you to specify a .env file in your run config, so it would be really great if this was also supported in Metals/VSCode.
@mwz That is a separate issue, but should be easy to do.
We would need an envFile value next to the env one and we could read it in Metals and add to the rest of values.
Feel free to create a PR or feature request. It would all be a very similar issue to https://github.com/scalameta/metals/pull/2118
We would need an
envFilevalue next to the env one and we could read it in Metals and add to the rest of values.Feel free to create a PR or feature request. It would all be a very similar issue to #2118
Ok, yeah it seems straightforward enough, let me have a look into that then. 馃憤
@mwz Let me know if you have any issues! https://scalameta.org/metals/docs/contributors/getting-started.html should have all you need
Most helpful comment
@mwz Let me know if you have any issues! https://scalameta.org/metals/docs/contributors/getting-started.html should have all you need