Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WebAPI debugging - Start Chrome Postman from Visual Studio

I am developing a Web API in Visual Studio 2015 and want to use Chrome/Postman to view the JSon results.

Is there any way I can get Postman to launch when I hit F5 to run and for Visual Studio to start a debugging session.

like image 879
Chris Hammond Avatar asked Jan 14 '16 11:01

Chris Hammond


People also ask

How do I debug API from Postman in Visual Studio?

Just start your API in debug mode, and let a Postman tab/app opened. If you have a breakpoint set in your code, when you send a request from Postman, it you hit that breakpoint and you can start debugging. There's also no way VS can know if Postman is ever installed.


1 Answers

Yes, you can!

You have to configure the Web tab of the Web API project to start an external program, pointing it to Chrome and passing in the parameters to tell Chrome to launch the Postman extension.

In Chrome:

  1. Go to chrome://apps/
  2. Right-click Postman shortcut and create a desktop icon
  3. Right-click Postman shortcut and view the properties, you'll find the path and parameters. Postman extension launch parameters

In Visual Studio, configure the web tab of the project properties: Visual Studio project properties

Now, when you hit F5... Postman will automatically launch.

like image 80
Mike L Avatar answered Oct 24 '22 15:10

Mike L