How to change .Net Core 2 debugger port of VSCode
If about web application then you should in folder .vscode in launch.json
file find line:
"env": {
"ASPNETCORE_ENVIRONMENT":"Development"
},
and add after "ASPNETCORE_ENVIRONMENT":"Development"
, that:
"ASPNETCORE_URLS":"http://localhost:xxxx"
where xxxx - port that you want to use.