Pass launch arguments. Pass JVM -D??? args.
Triying do debug Dropwizard project.
It supposed to be launched with command line args like this: java -jar ???.jar server config.yml.
So when launched I need to pass args server config.yml. From launch.json sample I don't see how is it possible. Also looking at source I don't see it either.
Also sometimes there's need to pass jvm args like this
-Dlogback.configurationFile=/path/to/logback.xml
How can it be done?
Command line arguments are not yet supported.
To implement these, the launch configuration (on the VSCode side) would require the specificiation of an additional args property:
https://github.com/fwcd/KotlinDebugAdapter/blob/017929c84d624d8ac090a2bbe7ced2ed55b1e8bc/package.json#L65-L97
On the server side, the initialization method would have to be updated accordingly:
https://github.com/fwcd/KotlinDebugAdapter/blob/017929c84d624d8ac090a2bbe7ced2ed55b1e8bc/src/main/kotlin/fwcd/ktda/adapter/KotlinDebugAdapter.kt#L84-L104
Is the args parameter in the launch method on the server side related to the args on launch.json configuration on the client side?
Should be fixed as of #41.
I think this should be reopened. I don't believe #41 addresses @ru5t's original issue...
vmArguments get passed to the JVM and cannot be used to pass arguments to the Java application itself.
For example, following snippet will call java --foo [...] App which fails because java doesn't recognize the argument.
{
// ...
"mainClass": "App",
"vmArguments": "--foo"
}
As a workaround, I am using
{
// ...
"mainClass": "App --foo",
}
which seems to work, as java passes --foo to the main method. Still, having support args is the solution.