How do I enable file editing in Visual Studio's debug mode?

前端 未结 11 743
抹茶落季
抹茶落季 2020-12-07 16:12

Is there a way to enable file editing while debugging in Visual Studio? I have unchecked the \"Require the source file to exactly match the original version\" checkbox. It m

相关标签:
11条回答
  • 2020-12-07 16:37

    If you have Edit and Continue turned on and you are using C# you can only edit a file if the debugger has stopped either via a break point or you manually breaking into the App via "Break All". You still won't be able to edit some files, Ex. xaml files in a WPF app, but it should solve most problems.

    0 讨论(0)
  • 2020-12-07 16:41
    • UNcheck "Enable Edit and Continue" (Tools -> Options -> Debugging -> Edit and Continue > Enable Edit and Continue)
    • Build your app.
    • Run it.
    • Stop it.
    • REcheck "Enable Edit and Continue".
    • Build your app.
    • Run it.
    • Try editing the files while debugging now.

    This worked for me. I believe it might be some bug or syncing issue with Visual Studio 2015.

    0 讨论(0)
  • 2020-12-07 16:43

    As far as I know you can uncheck the "Edit and Continue" checkbox.

    Tools -> Options -> Debugging -> Edit and Continue > Enable Edit and Continue (uncheck)

    0 讨论(0)
  • 2020-12-07 16:44

    You need to enable Edit and Continue.

    0 讨论(0)
  • 2020-12-07 16:52

    If your source origins from a decompiled dll, note that decompilers may add an IgnoreSymbolStoreSequencePoints instruction to assemblyinfo.cs:

    [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]

    This line must be removed in order to load the pdb-file, making edit & continue work.

    0 讨论(0)
  • 2020-12-07 16:52

    Removing tick at below option work for me

    Tools > Option > Debugging > General > Enable Edit and Continue

    *Note: At some fellow developers system, Adding this tick performed the trick.

    0 讨论(0)
提交回复
热议问题