79536273

Date: 2025-03-26 11:39:56
Score: 1.5
Natty:
Report link

I came across this situation in Visual Studio 2019. The reason for this behavior was the "Optimize code" flag on the Build tab. Some information about this can be found here:
https://learn.microsoft.com/en-us/visualstudio/debugger/project-settings-for-csharp-debug-configurations

Unless a bug appears only in optimized code, leave this setting deselected for Debug builds. Optimized code is harder to debug, because instructions do not correspond directly to statements in the source code.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: GRIGORIY LVOV