Using Assert for Trace statements (was: [lazarus] Lazarus Pascal code)

Marc Weustink Marc.Weustink at cuperus.nl
Wed May 3 08:08:26 EDT 2000


+ From: Michael A. Hess [mailto:mhess at miraclec.com]
+
+ But you have total control over how much of the code actually
+ has Trace turned on. You can just turn on one unit if that is
+ all you are testing.

About the half of my debugging with Lazarus was across several units.

+ You don't have to turn on Trace for all the units or the whole
+ application. In fact you don't even have to turn it on for the whole
+ unit. There is no reason why you can't place your own
+
+   {$ASSERTIONS ON}
+       .
+       .
+       .
+       .
+   {$ASSERTIONS OFF}
+
+ at specific points in a unit until you have worked out problems.

Then we are (allmost) back at the beginning. You'll have to remove them
after debugging ;-)

Marc






More information about the Lazarus mailing list