How to debug/unit test webAPi in one solution

前端 未结 7 1849
借酒劲吻你
借酒劲吻你 2021-02-12 22:17

Is there a way to unit test or debug a web api in one vs solution? I am consuming the WebAPI using HttpClient and have two instances of VS up to do this.

in 1 VS instan

7条回答
  •  甜味超标
    2021-02-12 22:39

    1. Start debugging Unit Test
    2. While on the first line of your test code or before calling your local web api project
    3. Right click on your web api project and Debug > Start new instance

提交回复
热议问题