In ASP.NET Webforms
or ASP.NET MVC
项目中,我可以在按F5进行调试时选择浏览器中正在调用的页面/路由,如下图所示。
相当于什么ASP.NET Core MVC
?我在用着IIS Express
with SSL
用于本地调试。在里面launchSettings.json
我有一个applicationUrl
定义如下:
"iisExpress": {
"applicationUrl": "http://localhost:59563/",
"sslPort": 44333
}
当我开始调试时,https://localhost:44333
叫做。我的目标是https://localhost:44333/MYROUTE
在启动调试模式时被调用。
我可以在哪里指定我想要的https://localhost:44333/MYROUTE
作为我调试的起始 URL?
您可以更改 launchsettings.json(在 Visual Studio 中,通常在解决方案资源管理器中展开“属性”节点时显示。您可以在相应的启动配置文件中设置 launchUrl:
{
"iisSettings": {
"iisExpress": {
"applicationUrl": "http://localhost:59563/",
"sslPort": 44333
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"launchUrl": "https://localhost:44333/YOURROUTE"
}
}
You can select the launch profile using the small black arrow next to the debug-button:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)