diff --git a/src/EditorFeatures/Core/EditAndContinue/ManagedHotReloadLanguageServiceImpl.cs b/src/EditorFeatures/Core/EditAndContinue/ManagedHotReloadLanguageServiceImpl.cs index 392acd89fed8e..9eb1cd932ac03 100644 --- a/src/EditorFeatures/Core/EditAndContinue/ManagedHotReloadLanguageServiceImpl.cs +++ b/src/EditorFeatures/Core/EditAndContinue/ManagedHotReloadLanguageServiceImpl.cs @@ -71,10 +71,11 @@ public async ValueTask StartSessionAsync(CancellationToken cancellationToken) { sessionState.IsSessionActive = true; - if (_disabled) - { - return; - } + // Reset the disabled flag so that a previous session's failure does not permanently + // disable Hot Reload for subsequent sessions. Any exception that caused _disabled to be + // set is a product bug, but resetting here gives the user a chance to try again after + // restarting the debug session, instead of having to restart the Roslyn process. + _disabled = false; try {