1 Reply Latest reply on Jun 5, 2012 4:45 AM by Mike_Mitchell

    How to get the call stack as it is displayed in the debugger

    gcatnine

      I would like to get the call stack as you see when you debug a script.

      Moreover, it could be nice to get the object name of the button that was pressed.

      Does anyone know if it is possible and how to do it?

        • 1. Re: How to get the call stack as it is displayed in the debugger
          Mike_Mitchell

          Hello, gcatnine.

           

          I'm not aware of any direct way to do this. However, you could set up a variable (say, $$stack) and add the calling object name (whether script or button) to the top as it makes the call with a calculation like this:

           

               Set Variable [ $$stack ; objectName & "<cr>" & $$stack]

           

          where <cr> is the pilcrow (carriage return) character.

           

          That way, $$stack will contain a return-delimited list that mimics the call stack.

           

          HTH

           

          Mike