Debug Stack for InterSystems Cache, Ensemble and IRIS

Comments

The repo contains an example. Here is an example of exporting the stack to a string in terminal

DEV>set sc = ##class(Examples.DebugStack).TestDebugStack()
Examples.DebugStack     TestDebugStack  Calling Method InnerStackTest with value: 5
|  |- Examples.DebugStack       TestInnterStack pVal argument: 5
|  |- Examples.DebugStack       TestInnterStack tMyVal: 15
|  |- Examples.DebugStack       TestInnterStack Calling TestThirdLevelStack with tMyVal: 15
|  |  |- Examples.DebugStack    TestThirdLevelStack     pVal argument: 15
|  |  |- Examples.DebugStack    TestThirdLevelStack     tFinalVal: 35
|  |- Examples.DebugStack       TestInnterStack TestThirdLevelStack completed OK
Examples.DebugStack     TestDebugStack  TestInnerStack completed OK
 
DEV>

It will be more readable if placed in a text file or a CSV. The "columns" are tab delimited.

It has the option of providing output to a string or a global character stream.