The ASP. NET CORE dotnet Run command runs using debug mode

Source: Internet
Author: User
Tags dotnet

Because my development environment is more complex, each debugging a set of projects to start several vs, more cumbersome, today decided to change a way to debug, for the code should not change the additional items directly using the dotnet Run command to run the debug mode,

At first unable to run Dubug way, I need is hosting environment:development mode, later found the answer in Google search, have to say Baidu really difficult to find a solution, basically are CTRL + C, CTRL + V.

Method is also simple, add name= to Windows environment variablesASPNETCORE_ENVIRONMENT value=Development 的环境变量即可。

Using the Windows Control Panel

If you ' re not a fan of the command prompt, you can easily update your variables using your mouse! Click The Windows Start menu button (or press the Windows key), search environment variables for, and choose Edit Environment Variables for youraccount:

Selecting This option would open the System Properties Dialog:

Click Environment Variables to view the list of current environment Variables on your system.

Assuming you does not already has a variable called ASPNETCORE_ENVIRONMENT , click the new ... button and add a New account Environme NT Variable:

Click OK to save all your changes. You'll need to re-open any command windows to ensure the new environment variables is loaded.

The ASP. NET CORE dotnet Run command runs using debug mode

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.