title: getting line numbers of offending code in debug vs release builds
body: <p>My understanding is that with crash dump of debug build you can get the line number of stack trace and this does not happen with release build. In order to try this, I created a very simple application that crashes. </p>
  
  <pre><code>class Program  
  {  
      static void Main(string[] args)  
      {  
          Console.WriteLine("Press any key to continue");  
          Console.ReadKey();  
          TestMe(null);  
      }  
  
  
      static void TestMe(MyClass c)  
      {  
          Console.WriteLine(c.Field);  
      }  
  }  
  
  class MyClass  
  {  
      public string Field { get; set; }  
  }  
  </code></pre>
  
  <p>I created one debug build and one release build. Ran both of these and catpured crash dump via ADPlus. Below  are the stack traces for each build. As you can see I am getting the line number in both builds. Obviously difference is that in release build its not reporting call to TestMe method. Any ideas why? Do I need add symbol path to application pdb files in both cases</p>
  
  <p><strong>Debug build</strong></p>
  
  <pre><code>0:000&gt; !CLRStack  
  OS Thread Id: 0x2398 (0)  
  Child SP IP       Call Site  
  001eee74 003400db ConsoleApplication1.Program.TestMe(ConsoleApplication1.MyClass)*** WARNING: Unable to verify checksum for ConsoleApplication1.exe  
   [c:\ConsoleApplication1\ConsoleApplication1\Program.cs @ 20]  
  001eee84 003400a5 ConsoleApplication1.Program.Main(System.String[]) [c:\ConsoleApplication1\ConsoleApplication1\Program.cs @ 14]  
  001ef0c8 6ccb21bb [GCFrame: 001ef0c8] 
  </code></pre>
  
  <p><strong>Release build</strong>  </p>
  
  <pre><code>0:000&gt; !CLRStack  
  OS Thread Id: 0x2e40 (0)  
  Child SP IP       Call Site  
  003bf5f8 772af8c1 [GCFrame: 003bf5f8] Unknown  
  003bf3b4 002b0098 ConsoleApplication1.Program.Main(System.String[])*** WARNING: Unable to verify checksum for ConsoleApplication1.exe  
   [c:\ConsoleApplication1\ConsoleApplication1\Program.cs @ 14]  
  003bf5f8 6ccb21bb [GCFrame: 003bf5f8]   
  </code></pre>