[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] question about #define DEBUG



On Tue, 25 Dec 2001, Joo-Han Song wrote:

> The reason why I am trying to use DEBUG option is that I hope to trace a
> specific variable during my simulation whenever specific function is called.
> So is there any method I can use to trace the changes of specific variable?

print it out; the debug class variable allows you to do
if (debug_) printf("blah %i", metasyntacthing);

only on that variable for the particular objects you are interested in
(once you have done/scheduled $object set debug_ 1), rather than say
the other thousand or so objects your simulate-the-internet simulation
might also have running. Easier than trying to print out info to
identify which object you're looking at.

Alternatively, there's gdb and its trace and
breakpoint functionality...

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>