You can simulate single stepping by inserting code between each statement. While that may sound like a lot to get rid of, once your code is debugged, it's not so bad if you use conditional compilation, viz:
The #IF lines can simply be copied and pasted where needed. By defining sstep to be 0, you can eliminate the debug stuff in you compiled code entirely.
The halt routine can even be designed to dump all your vairiables and pin states, too, if you want that much info at each step.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 12/3/2007 4:34:24 AM GMT
Comments
' {$STAMP BS2} ' {$PBASIC 2.5} #DEFINE sstep = 0 DO #IF sstep #THEN GOSUB halt #ENDIF W0 = W0 + 1 #IF sstep #THEN GOSUB halt #ENDIF DEBUG DEC W0, CR LOOP #IF sstep #THEN halt: DEBUGIN WAIT(" ") RETURN #ENDIFThe #IF lines can simply be copied and pasted where needed. By defining sstep to be 0, you can eliminate the debug stuff in you compiled code entirely.
The halt routine can even be designed to dump all your vairiables and pin states, too, if you want that much info at each step.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 12/3/2007 4:34:24 AM GMT