2

Lately, VS has been getting more and more annoying about warning me about editing code while debugging. Regardless of whether it is a popup telling me that a file has been edited, purple underlining, or a warning that gets grouped with the compiler warnings and errors, I don't want it. I wish it would just let me edit, continue running the program that was built, and keep quiet about it.

Is there a way to tell it to do that?

Incidentally, I have already disabled edit and continue. See Edit and Continue: "Changes are not allowed when..."

Trevor
  • 7,777
  • 6
  • 31
  • 50
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
  • Try [this](https://stackoverflow.com/questions/8174800/what-does-it-mean-require-source-files-to-exactly-match-the-original-version) – Eldar Dec 09 '19 at 16:04

2 Answers2

0

You can apply changes to the source code in debug mode when you stop at a breakpoint.

Manual: How to: Apply Edits in Break Mode with Edit and Continue (Visual Basic)

Streletz
  • 192
  • 3
  • 15
0

This is a workaround but some workarounds, well, work.

Run two instances of VS on the same solution. Debug one and encounter needed edit. Ctrl+TAB to the other instance and make the edit (without saving... by the way use auto-save). Continue until you’re done, and then save the files in instance 2. After debug, the changes are available to both instances.

Rarely (at least in my experience) do you actually want edit-and-continue; usually you’re watching the code under debug and realize it is wrong and want to fix it, but also want to see some downstream effects without killing the debug session.

This gives you that with a minor inconvenient task switch.

Kit
  • 20,354
  • 4
  • 60
  • 103