Thursday, 25 February 2016

How to debug the Web API in ASP.NET MVC?


Many  developers are having question of how to debug the Web API from client project or from source that consumes Web API.

 For debugging the Web API there's no need to use any new extension, well you can do this stuff in Visual Studio itself.


  1. Go to  Solution Explorer where you would be having webapi project and the project that consumes web api.
  2. Now right click and select properties or hit Alt+Enter.
  3. Now in Startup Project select multiple  startup project.
  4. Go to Action and select Start in dropdown for both projects.
  5. That's it now click Apply and Ok. 
  6. Now create a breakpoint in both projects and enjoy the debugging.


No comments:

Post a Comment

How To Pass An Array As A Parameter While Calling an ASP.NET Web API C#

Please visit my C# Corner Blog for this, where I have provided better efforts to make this concept more understandable - www.c-sharpcorner....