Describe the bug
I am attempting to run tests in a project that uses the constructor-tearoffs experiment, and I'm getting errors while running the test from inside VSCode.
I have attempted to use both vmAdditionalArgs in the launch config for that test, as well as dart.vmAdditionalArgs at the workspace level, but neither are passed along to the test.
Example of launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "server",
"program": "test/server_test.dart",
"request": "launch",
"type": "dart",
"vmAdditionalArgs": [
"--enable-experiment=constructor-tearoffs",
]
}
]
}Example of my .code-workspace:
{
"folders": [],
"settings": {
"dart.vmAdditionalArgs": [
"--enable-experiment=constructor-tearoffs"
],
}
}I have verified that the VM args do work as expected launching something other than a test.
I have also verified that dart test --enable-experiment=constructor-tearoffs works fine from the commandline.
To Reproduce
- Create a project that uses constructor tear-offs
- Write a test file that references the library containing tear-offs
- Attempt to run using methods described above
Expected behavior
That the tests run without analysis failure.
Versions (please complete the following information):
- VS Code version: v1.62.3
- Dart extension version: v3.28.0
- Dart/Flutter SDK version: v2.15.0-42.0.dev