Visual Studio Code + MSTEST?

2019-05-07 22:21发布

问题:

Is there a way to run and debug MSTest V2 from Visual Studio Code? I'm stumped.

It runs great from the command line: dotnet test produces expected results.

Here's what my current launch.json looks like:

"configurations": [
    {
        "name": ".NET Core Test (Serialization)",
        "type": "coreclr",
        "request": "launch",
        "preLaunchTask": "build",
        "program": "${workspaceRoot}/Fact.Extensions.Serialization.Tests/bin/Debug/netcoreapp1.0.1/Fact.Extensions.Serialization.Tests.dll",
        "args": ["test", "-debug"],
        "cwd": "${workspaceRoot}/Fact.Extensions.Serialization.Tests",
        "externalConsole": false,
        "stopAtEntry": false,
        "internalConsoleOptions": "openOnSessionStart"
    }

Presumably coreclr launch equates to a dotnet run, which would be problematic.