How to use condition in Delphi breakpoint properties

I found that the nested loop fails when a particular condition is reached, anyway, when i = 1, J = 3 and k = 5

I tried right-clicking the breakpoint and in the state that I set

(I = 1) and (J = 3) AND (K = 5)

in any case, the breakpoint does not stop ...

What's wrong?

+3
source share
4 answers

I just tried this in D2007 and it works great. which version are you using?

procedure TForm85.FormClick(Sender: TObject);
var i,j,k : integer;
    z:integer;
begin

  for i := 0 to 10 do
  for j := 0 to 10 do
  for k := 0 to 10 do
  BEGIN
    z := z + i * j * k; // breakpoint on this line.
  END;

  ShowMessage(IntToStr(z));
end;

Do you think that a breakpoint cannot be reached because the condition is not met?

+2
source

.

  • ""
  • , "".
+1

May be according to your code

(I = 1) and (J = 3) AND (K = 5)

may never get these values ​​at the same time

+1
source

Set a breakpoint on the line of code before the condition is met, and execute F8?

0
source

Source: https://habr.com/ru/post/1777883/


All Articles