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

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!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Derek Ji

Derek Ji

Full Stack Developer (.NET | Angular)