project-system icon indicating copy to clipboard operation
project-system copied to clipboard

Improve the scenarios around modifying CPS projects during debugging

Open davkean opened this issue 4 years ago • 3 comments

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.

davkean avatar Mar 05 '20 01:03 davkean

Internal PR: https://devdiv.visualstudio.com/DevDiv/_git/CPS/pullrequest/234626

davidwengier avatar Mar 11 '20 07:03 davidwengier

@davkean do you remember the exact repro for this? What did you rename? I had a quick try and couldn't reproduce on a simple project. Did you have a delayed design time build?

davidwengier avatar Mar 11 '20 11:03 davidwengier

Hi, is there some news about this scenario?

We're extending CPS for PHP projects, where it's desirable to be able to modify projects. While users can add files, they can't delete them when debugging. Is there any way how to achieve that?

Thank you!

Miloslav avatar Jun 27 '22 14:06 Miloslav