码迷,mamicode.com
首页 > Web开发 > 详细

ASP.NET CORE dotnet run 命令使用debug方式运行

时间:2016-10-23 17:10:11      阅读:698      评论:0      收藏:0      [点我收藏+]

标签:host   shell   change   lis   command   arc   技术   com   window   

由于我的开发环境比较复杂,每次调试一套项目都要启动好几个VS,比较繁琐,今天决定换一种方式调试,对于不该改动的代码的附加项目直接使用dotnet run命令以debug的运行方式运行,

一开始无法运行dubug方式,我需要的是Hosting environment: Development模式,后来在谷歌搜索找到了答案,不得不说百度真的很难找到解决方法,基本都是CTRL+C ,CTRL+V.

方法也很简单,windows 环境变量里面添加name= ASPNETCORE_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 for environment variables, and choose Edit environment variables for your account:

技术分享

Selecting this option will open the System Properties dialog:

技术分享

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

技术分享

Assuming you do not already have a variable called ASPNETCORE_ENVIRONMENT, click the New... button and add a new account environment variable:

技术分享

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

ASP.NET CORE dotnet run 命令使用debug方式运行

标签:host   shell   change   lis   command   arc   技术   com   window   

原文地址:http://www.cnblogs.com/kzwrcom/p/5990050.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!