在VS 2019中进行调试时,api url会自动打开,这与角度实时url不同。
角度实时网址是我实际的完整应用程序。有没有一种方法可以在调试时自动打开该URL?
答案 0 :(得分:2)
我认为您需要稍微修改json配置。因此,当您使用VS运行代码或使用dotnet run命令时,将使用端口59709运行您的应用程序
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:59709/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"ancmHostingModel": "InProcess"
},
"KaddaTechnologies": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:59709/"
}
}
}