My project requires the following vmArgs to run :
"vmArgs": "-javaagent:lib/aspectjweaver-1.9.5.jar -javaagent:lib/spring-instrument-5.2.3.RELEASE.jar --module-path lib/javafx-sdk-13.0.2/lib --add-modules=javafx.controls"
Putting this in the launch.json configuration object makes the project run perfectly. For unit tests, the same vmArgs should be put into the settings.json's java.test.config object, which I did as you see below :
{
"java.test.config":
[
{
"name": "testConfig",
"workingDirectory": "${workspaceFolder}",
"vmArgs": "-javaagent:lib/aspectjweaver-1.9.5.jar -javaagent:lib/spring-instrument-5.2.3.RELEASE.jar --module-path lib/javafx-sdk-13.0.2/lib --add-modules=javafx.controls"
}
],
"java.test.defaultConfig": "testConfig"
}
This part is not working. My JUnit tests are not being instrumented correctly. What am I doing wrong? The vmArgs line is an exact copy of what I have in launch.json.
I think it might be caused by the capitalization. Previously, it's vmargs
not vmArgs
. But the extension has changed to support both in this PR: https://github.com/microsoft/vscode-java-test/pull/1080
Do you still have this issue now?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With