dotnet / dotnet/project-system

Improve the scenarios around modifying CPS projects during debugging

Open
#5,944 3 comments 0 reactions 0 assignees View on GitHub
Feature-Debugging Needs-CPS-work Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

During debugging we and/or CPS disable certain behaviours (app designer, project reload, delete from project, drag and drop) but leaves others enabled (project unload, remove from project, cut and paste, project file editing) leading to inconsistencies and potential hangs (see "Previously" section). We need to rationalize these behaviours into a more predictable system.

Legacy disables many menu items during debugging to prevent project modifications.

For CPS we should try to enable all modifications and see what happens. As long as Edit and Continue correctly flags situations where it can't be applied, and nothing crashes, we discussed and are generally happy for the user to keep working on their code and project to their hearts content, whether they are debugging or not.

Previously...

We disable Properties window but not Project FIle Editing during build.

We avoid reloading the project while debugging, which results in the following behavior:

1. User edits project file
2. We schedule the reload
3. Operation progress starts and waits for the reload
4. You try to Rename

-- Visual Studio hangs waiting for progress that will never complete --

We have a bug to track being smarter around this and not trigger operation progress on the scheduling of the reload, but we should make the project file read-only during debugging similar to Properties window to avoid this situation completely.

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.