title: Delphi debugger - go to line when exception happens
body: <p>I got switched to other project at work and I noticed that Delphi XE2 debugger does not show the line that raised exception. When i got back at home i started to investigate. Then I found out that it can be disabled in <strong>Tools -> Options -> Debugger</strong> options and check <strong>Integrated debugging</strong>. Also I unchecked everything under <strong>Language exceptions</strong> in <strong>Exception types to ignore</strong> list. <strong>Notify on Language Exceptions</strong> left checked. <strong>Project -> Options -> Compiling</strong>, I have defaults there and <strong>Overflow</strong> and <strong>Range cheking</strong> enabled. I am running <strong>Debug</strong> build. I <strong>Cleaned</strong> it.</p>
  
  <p>I have not noticed before, but now Delphi debugger doesn't give me the line when I call this code:</p>
  
  <pre><code>procedure TForm1.BitBtn1Click(Sender: TObject);
  var
    _List: TStringList;
  begin
    _List := TStringList.Create;
    try
      Caption := _List[0]; // 'List index out of bounds (0)' here
    finally
      FreeAndNil(_List);
    end;
  end;
  </code></pre>
  
  <p>but this works (provided only to show that debugger does show the line for some things):</p>
  
  <pre><code>{$R+} // Range check is ON
  procedure TForm1.BitBtn2Click(Sender: TObject);
  var
    _myArray: array [1 .. 5] of string;
    i: integer;
  begin
    for i := 0 to 5 do
    begin
      _myArray[i] := 'Element ' + IntToStr(i); // Range check error here
      ShowMessage('myArray[' + IntToStr(i) + '] = ' + _myArray[i]);
    end;
  end;
  </code></pre>
  
  <p>What is happening here? How to make the debugger to show as much as possible?</p>
  
  <p>Thank you.</p>