Hi guys. I need your help.
In my application, in each iteration loop, I parse the string and remove the "extra" characters, e.g.:
//get position #10 in the line
LineEndingPos_10:= Pos(#10,Buffer);
repeat {until LineEndingPos_10 = 0;}
case LineEndingPos_10 of
0:
begin
{I need to stop the debugger here...}
BufferStg:= BufferStg + Buffer;
end;
1: //#10 at the beginning of the line
begin
Inc(StrCounter);
if Length(BufferStg) > 0 then
begin
//dump the buffer storage to memo ...
memoOutput.Lines.Add(Format(ConstFormatStr,[StrCounter,'B',BufferStg]));{B}
memoOutput.SelStart:= UTF8Length(memoOutput.Text);
end;
Application.ProcessMessages;
//clear the storage buffer
BufferStg:='';
//clip the first character #10(LF) from the buffer
Delete(Buffer,1,1);
//... and continue the cycle further
end
else //#10(LF) in the middle or at the end of the buffer
...
The total number of iteration cycles is more than 4400. An error can occur on a cycle with the number 2531, e.g.:
2528. {C}~ gbak:0 records written
2529. {C}~ gbak: writing index PK_TBL_LS_INFECTION_HIV
2530. {C}~ gbak: writing data for table TBL_LS_INFECTION_HIV
gbak:0 records written
2531. {C}~ gbak: writing index PK_TBL_LS_INFECTION_HERPES6
2532. {C}~ gbak: writing data for table TBL_LS_INFECTION_HERPES6
It will take a very long time if I press F8 2530 times.
Can I stop debugging under a certain condition, e.g. when the iteration counter reaches the number 2528?