debugger Conditional breakpoints

jmac12

Member
I'm trying to setup a conditional breakpoint on some code so for example if logtest = "True" then run the breakpoint otherwise just skip over. But when i try and set it up it doesn't work im using open edge 10.2b
and running no compiled code. so any suggestions would be great cause i dont really want to put messages in my code I want to be able to step thru my code.
 
You can set watchpoints in the debugger UI.

Unfortunately you cannot set watchpoints using a method on the DEBUGGER system handle:
You cannot set a watchpoint programmatically using the DEBUGGER system handle. A watchpoint is a form of breakpoint which tells the Debugger to interrupt program execution when the value of a variable, buffer field, or attribute reference changes.

So you will need to:
- start the debugger
- select [ Edit / Breakpoints... ]
- click on the 'New' button
- select the Watchpoint tab
- enter expression logtest and condition logtest = true
- resume execution
 
ok cheers i managed find that after i posted. so i got what i needed from it. Its just a shame you still have to put some code in cause let say it was number in a field that means it would stop it any time its changed not necessarily where you want to step thru. why i progress does it always have to be 10 times hard than it needs to be.

Thanks anyway
 
was number in a field that means it would stop it any time its changed

That is incorrect. I tested the following:

Code:
DEF VAR ii AS INT.
 
DO ii = 1 TO 10:
   DISPLAY ii.
END.

If you set expression to ii and condition to ii=4 then the debugger will only pop up when ii = 4.
 
i understand that but it was thinking if said variable is changed in two places then it wouldnt necessarily stop where you want it to. I'll have to have a play with it and see how i get on. I wanted really to stop when i got to certain record e.g. ordernum = 123 and step thru but didnt seem to like me using the database field for what ever reason
 
If the same condition can occur at two points then this can be a problem.

Using database fields works fine (tested with 10.2A01 on Windows Server 2003) - you do need to add the table name.
 
ok cheers mate I'll have to try the database fields again maybe me just getting it wrong just annoying how the breakpoint has the box for condition but cant be used... grrr but i guess if i want to do I'll just use a logical that way I only change it there and then i can step thru

Thanks for you help
 
Back
Top