Debugging back test scripts with print statements

I have a back test script and would like to see the values of some of the variables to debug it. I have entered lines like: printf("positions %g", positions); However, I do not see the output in the Interpretation window. Searches seem to suggest that should work, but the window remains empty. Is there better way?

Thanks,

 John

Answering my own question:

_Trace()

 John

Printf function prints to commentary window or Interpretation window.

Interpretation window output of printf is not visible if running analysis. Output of printf is visible in Interpretation window if AFL is applied to chart pane.

So since you run backtest better use _Trace/_TraceF functions or inbuilt debugger.

For more information about debugging see this thread

Another lovely bit of usage.

Best,

  John