title: How to Debug Mscorlib.dll in Visual Studio 2015
body: <p>I could do reverse engineer of other custom dlls (my own created <code>.net</code> assemblies) successfully but I couldn't do it on <code>mscorlib.dll</code> with the same steps.</p>
  
  <p>I have tried to generate pdb of <code>mscorlib.dll</code> using jetbrains dotpeek.</p>
  
  <p>My visual studio debugging option has been set to the folder containing that pdb.</p>
  
  <p>I tried to put the <code>mscorlib.ini</code> file to set the code Optimization to No, like this:</p>
  
  <pre><code>[.NET Framework Debugging Control]  
  GenerateTrackingInfo=1  
  AllowOptimize=0 
  </code></pre>
  
  <p>and put the file on the same location where the temporary dll is loaded (e.g.</p>
  
  <blockquote>
    <p>C:\Windows\Microsoft.NET\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089).</p>
  </blockquote>
  
  <p>When I attach my VS to a process, I could see that the Optimized value is still 'Yes' in Visual Studio's Modules.</p>
  
  <p>Appreciate if anyone can guide me the step by step instructions on how to debug the mscorlib.dll when attaching VS to a process using mscorlib.dll.</p>
  
  <p>Thanks.</p>