简体   繁体   中英

Visual Studio Debug Single Test

I use to be able to right-click in one of my test classes and select Debug Test which would run the single test. All of a sudden it says Debug Test(s) when I right-click and runs all my tests.

How can I debug just one test?

Thanks

Microsoft Visual Studio Community 2017

You can right click directly on your [TestMethod] and select "Run test(s)"/"Debug test(s)", or open the Test Explorer window (from the menu: Test -> Windows -> Test Explorer) and run test method from there (selecting a group or a single one).

PS: remember to put at least one breakpoint inside the test you want to debug.

Not sure why but I had to reinstall the NuGet Test packages and that seemed to fix it. Thanks Manuel for the help.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM