Enabling metadata updater used by hot-reload causes the runtime and libraries to take codepaths conditionalized by MetadataUpdater.IsSupported property. These codepaths receive less thorough testing and have higher risk of containing bugs. #78218 has been an example of such bug.
Metadata updater is automatically enabled when managed debugger is attached and there is no way to suppress it:
|
result = CORDebuggerAttached() || g_pConfig->ForceEnc() || g_pConfig->DebugAssembliesModifiable(); |
. It means that a bug in hot-reload specific codepath can make the application impossible to debug. This situation was encountered in
#78218.
We should add a config switch that unconditionally disables metadata updater and that can be used as a workaround for bugs in hot-reload specific codepaths.
Context: #78218 (comment)