Well it will still not hit the breakpoint, what I wanted to say is difference in IL code is due to optimization but optimization does not stop debugging.
In release mode, pdb files are not generated, without pdb files vs cannot debug anything.
Pdb is mapping of machine code to source code.
Sorry for the late response. Yes you are completely right. PDB files are necessary to debug our C# code.
I have added the IL code for both, Release and Debug build. You are right, at IL level optimizations are done. It maybe is a bit misleading but was necessary as a simple example.
Very interesting topic, though!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.