Page 1 of 1

Debugging with tracer or message

Posted: Tuesday 10 May, 2011 - 16:15
by ElroyDeege
The larger a model gets, the more difficult it will be to control the behaviour of all atoms in your model. You may want to save yourself lots of time debugging by using traces or messages.

If it is unclear what effect an event has on a certain atom, you can trace relevant values or strings before and after the event. Make sure all you wish to trace is converted to a string, like:

Code: Select all

Trace(Concat([Test of row number:], string(Label([RowNr], i))))
If you suspect that atoms are not triggered for a certain event, then you could write the 4DScript: msg([Triggered!]) in the event of interest. This is a fast way of checking your assumption.

Note: If lots of atoms will pass this certain event in a short time, slow down your runspeed. Otherwise it might become hard to stop your simulation and remove the message.

Good luck!