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