4 Simple Steps for Debugging .NET Core Web Application Using VS Code

Step #1. Install the extension

Derek Ji
Oct 26, 2020
Install C# Extension

Step #2. Configurations

Press CTRL +SHIFT + P, select .NET: Generate Assets for Build and Debug

It will create 2 files under .vscode folder

Step #3. Launch Your Application

Simply press F5, or go to the Run panel to click the green button.

Now your application should be started successfully, and the default ports are:

  • 5000 for HTTP
  • 5001 for HTTPS

Step #4. Change Ports & Default Page

  1. To change the ports, ASPNETCORE_URLS could be added to the env section in launch.json

2. To setup swagger as your default page, simply add uriFormat into the section serverReadyAction in launch.json

Enjoy!

--

--