Create an ASP.NET Core web app

Page:

Debug your App

Open the Controllers/HomeController.cs class by double-clicking it the Solution pad on the left-hand side of the screen.

This ASP.NET Core project uses the MVC architecture, which follows a standard convention. By default, a controller like HomeController will handle all web requests to www.mydomain.com/Home and route them to the method matching the rest of the path.

Locate the Index method. This method will handle requests to www.mydomain.com/Home/Index. Note that there are also methods for About and Contact. The project is configured by default to load the page at /Home/Index.

Click the editor margin to the left of the return View() line of code in Index to set a breakpoint. A breakpoint is used to stop execution of the app at that point and debug your app.

Click the Start Debugging button (with a Play icon) on the top left to build and start debugging the app. Alternatively, you can also start debugging by selecting the Run -> Start Debugging menu item.

When the application hits the line of code with the breakpoint, it stops executing and you will have access to a full array of debugging tools, including the call stack, variable inspectors, and more.

Click the Continue Running (the new Play icon in the group of 4) button to continue executing the code.