dotnet / dotnet/vscode-csharp

ASP.NET CORE MVC - HOT-RELOAD in launch.json acts buggy

Open
#5,963 0 comments 1 reaction 0 assignees View on GitHub
Debugger OmniSharp Triaged
Dominant language
TypeScript
Stars
3.1k
Forks
737
Avg merge
18h 40m
Merged PRs (30d)
31

Description

Type: Bug

Folders and files:
~/.vscode/launch.json
~/ProjectFolder/Properties/launchSettings.json

WHEN setting a configuration in launch.json for running a watch-command (with hot-reload), "AND" setting the parameter "launchSettingsProfile": "xxxxx"

THEN the desired launchProfile is only selected when there is a "comment" "somewhere" in the properties/launchSettings.json-file.

-----
WHEN there is no "comment" somewhere in the properties/launchSettings.json-file...

THEN the desired launchProfile set in the launch.json is NOT selected.

-----
It seems that,
IF the system can parse the properties/launchSettings.json-file properly,

THEN is doesn't take the launch.json specific configuration into account.

WHEN the system CAN'T properly parse the properties/launchSettings.json-file,

THEN it "does" take the launch.json specific configuration into account.

-----
What is going on here?
What am I doing wrong?
How can I properly create a hot-reload action WITH selecting a specific launchprofile configuration?

-----
I could just set a specific launchProfile in the properties/launchSettings,
and then set it as the first profile.
And call this with a vscode-task.
But then I don't use the lanch.json specific configuration functionality.
What is best practice here?
Or is this behaviour a bug?

-----
Files
[launch.json.txt](https://github.com/dotnet/vscode-csharp/files/12181244/launch.json.txt)
[launchSettings.json.txt](https://github.com/dotnet/vscode-csharp/files/12181245/launchSettings.json.txt)

-----
Extensions

Extension | Author (truncated) | Version
-- | -- | --
ng-template | Ang | 16.1.4
vscode-html-css | ecm | 1.13.1
dotnet-test-explorer | for | 0.7.8
remotehub | Git | 0.60.0
csharpextensions | kre | 1.7.3
csharp | ms- | 1.26.0
azure-repos | ms- | 0.36.0
remote-repositories | ms- | 0.38.1
vsliveshare | ms- | 1.0.5877
material-icon-theme | PKi | 4.29.0
LiveServer | rit | 5.7.9

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.