Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to config debug test in vscode without codelens? #1767

Closed
Thaina opened this issue Sep 25, 2017 · 6 comments
Closed

How to config debug test in vscode without codelens? #1767

Thaina opened this issue Sep 25, 2017 · 6 comments
Milestone

Comments

@Thaina
Copy link
Contributor

Thaina commented Sep 25, 2017

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 ?

@DustinCampbell
Copy link
Member

DustinCampbell commented Sep 25, 2017

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. Create commands for running/debugging tests #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. Disable references code lens #1570

Does that help?

@gregg-miskelly
Copy link
Contributor

@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.

@Thaina
Copy link
Contributor Author

Thaina commented Sep 26, 2017

@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

@DustinCampbell DustinCampbell added this to the 1.13 milestone Oct 30, 2017
@DustinCampbell
Copy link
Member

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

@Thaina
Copy link
Contributor Author

Thaina commented Oct 30, 2017

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

@DustinCampbell
Copy link
Member

No. The issue tracking that is right here; #421.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants