Skip to main content

ASP.NET WEB API launch.json for Visual Studio Code

Suppose you want to debug your ASP.NET application on Visual Studio as well Visual Studio Code. Sure you can use the run feature of the Solution Explorer extension in Visual Studio Code, but that’s not really a VS Code native feeling.

  1. Rename or delete eyour .vscode/launch.json file.
  2. Go to Run and Debug tab
  3. Press “Generate”
  4. Go to launch.json
  5. Add "uriFormat": "%s/swagger" undere serverReadyAction
  6. Add "ASPNETCORE_URLS": "https://localhost:7065" under env
  7. Press F5 and enjoy