aehimself 396 Posted September 7, 2019 Hello, I was just wondering if this is "normal" or just an anomaly on my side. Consider the following code: Quote procedure TForm1.Button1Click(Sender: TObject); Var sl: TStringList; begin Try sl.Add('Hello'); Except On E:Exception Do Begin ShowMessage(E.Message); End; End; end; Set a breakpoint on sl.Add and execute. When the execution stops, press F8. However the Except block executes, the Delphi debugger does not continue the step-by-step debugging. I know, you can put a breakpoint on On E:Exception but it would be a lot nicer to see how the exception is flowing (especially through 5-10 units until it reaches the final handler). Is there a way to achieve this or it's just a limitation of the debugger? Cheers! Share this post Link to post
Fr0sT.Brutal 900 Posted September 10, 2019 AFAIK there's no way except breakpoint on catch block Share this post Link to post
Der schöne Günther 316 Posted September 10, 2019 Are you sure F8 is the right hotkey? I think in your case, it should be Shift+F8 (run until return). Also, TStringList is from Delphis default RTL. Be sure to have "With Debug DCU files" checked in your project or you cannot have breakpoints in there. 1 Share this post Link to post
aehimself 396 Posted September 10, 2019 5 hours ago, Der schöne Günther said: Are you sure F8 is the right hotkey? I think in your case, it should be Shift+F8 (run until return). Also, TStringList is from Delphis default RTL. Be sure to have "With Debug DCU files" checked in your project or you cannot have breakpoints in there. Shift-F8 will return at the end of the calling method, in this case the OnClick handler. It will NOT put you inside the Except block in any case. As for TStringList, I just chose something random, you can even put Raise Exception.Create('hello world'); instead. Also, I believe that when you try to access an uninitialized object it does not matter where it comes from, as it does not exist... I am afraid that @Fr0sT.Brutal will be right, and this - too - is going to be a limitation of the IDE. Too bad 🙂 Share this post Link to post