VS2022 – Can’t view values of variables when exception thrown – Local variables and arguments are not available in ‘[Exception]’ call stack frames
You can go to Debug>Windows>Exception Setting and choose “System.InvalidOperationException” to solve the issue.