Omnisharp-vscode: How to config debug test in vscode without codelens?

Created on 25 Sep 2017  路  6Comments  路  Source: OmniSharp/omnisharp-vscode

I have installed nunit to test my code. But I could only run dotnet test. I don't know how to config to run debug test

Also vscode has its Debug all tests command but it report this error

command 'vstest.execution.debugAll' not found

when I call it

Does it need omnisharp-vscode or roslyn to handle commands like these ?

Question Test

Most helpful comment

@gregg-miskelly Normally I don't open codelens because it make line of code too messy. Currently now I need to open codelens just for a times I need to debug and close it afterward

All 6 comments

We don't provide a way to do this today, but we're tracking a couple of options:

  1. Add commands to support running and debugging of tests. https://github.com/OmniSharp/omnisharp-vscode/issues/421
  2. Add a way to disable only the references code lens. This would still require running/debugging via CodeLens but you wouldn't have to see the references code lens to do it. https://github.com/OmniSharp/omnisharp-vscode/issues/1570

Does that help?

@Thaina in case you are not aware, the way that the C# extension normally supports running/debugging unit tests is via a CodeLens on the test methods. I wrote up some documentation: https://github.com/OmniSharp/omnisharp-vscode/wiki/How-to-run-and-debug-unit-tests

@DustinCampbell feel free to review/fix/add anything you want to that.

@gregg-miskelly Normally I don't open codelens because it make line of code too messy. Currently now I need to open codelens just for a times I need to debug and close it afterward

Hi Thaina! With the 1.13-beta4 release, we've added options that allow you to disable the "References" Code Lens independently from the "Run/Debug Test" Code Lenses. You can control them with the following options:

"csharp.referencesCodeLens.enabled": true,
"csharp.testsCodeLens.enabled": true

You can use the instructions here to install the latest beta release.

cc @rchande

@DustinCampbell Does that release also cope with running debug test from vscode command?

No. The issue tracking that is right here; https://github.com/OmniSharp/omnisharp-vscode/issues/421.

Was this page helpful?
0 / 5 - 0 ratings