Author Topic: backtrace()  (Read 293 times)

Quote
backtrace()

Purpose
Use the backtrace function to print the current callstack to the console. This is used
to trace functions called from withing functions and can help discover what functions were
called (and not yet exited) before the current point in your scripts.

Returns
No return value.

Quoted from some stickied torque guide. Anyways, does anyone know how to use this function? I've been fiddling with it for a few minutes, and still have no idea what it does.

It tells you the order of functions that were called. For example, if I call jeff(); which actually calls fred() backtrace would show this:
Backtrace: jeff -> fred

Obviously, it prints the current callstack to the console. This is used
to trace functions called from withing functions and can help discover what functions were
called (and not yet exited) before the current point in your scripts.