Package com.adobe.xfa

Class ScriptDebugger

  • public class ScriptDebugger
    extends Object
    An ScriptDebugger provides script debugging access to an ScriptHandler.
    • Constructor Detail

      • ScriptDebugger

        public ScriptDebugger()
    • Method Detail

      • getScriptID

        public int getScriptID​(ScriptHandler oScriptHandler,
                               String sScriptContents,
                               Node oContextNode,
                               int eReason)
        Provide a unique script ID for the specified script, given its context information. It's up the the derived class to look up and possibly create an identifier. The value has no particular meaning to the debugging framework. Typically the derived class will maintain a table, and the ID is the index into that table.
        oScriptHandler - the script handler of the script.
        sScriptContents - the executable code of the script.
        oContextNode - the Node that is the current node when the script runs.
        eReason - the reason for the execution of the script.
        the ID for the script.
      • getScriptID

        public int getScriptID​(ScriptHandler oScriptHandler,
                               String sScriptContents,
                               String sContextNodeSOM,
                               int eReason)
        For remote debugging. To support remote debugging (i.e. debugging an application in another executable) the derived class must override this method. It's identical to the other version of getScriptID except that the context node is provided as a SOM expression instead of as an Node.
      • willExecuteScript

        public void willExecuteScript​(int nScriptID)
        Signals that the specified script is about to execute. At this point the derived class can optionally display the script. If breakpoints have been set for this script ID, then the derived class must re-establish them by calling ScriptHandler::debugBreakPoint. The reason for this is that the script handler doesn't have the big picture -- it simply executes a script when told to do so.
        nScriptID - the unique identifier of the script.
      • didExecuteScript

        public void didExecuteScript​(int nScriptID,
                                     Arg oReturnValue)
        Signals that the specified script has finished executing. The return value is provided. The derived class may choose to ignore this, or display the result to the user.
        nScriptID - the unique identifier of the script.
        oReturnValue - the return value of the script.
      • stopped

        public void stopped​(int nScriptID,
                            int nLine)
        Signals that the specified script has stopped momentarily. Either a breakpoint or single-stepping through code can cause this. The derived class should display the script at the specified line.
        nScriptID - the unique identifier of the script.
        nLine - the current execution line of the script.
      • resolvedValue

        public void resolvedValue​(String sValueName,
                                  Arg oRetrievedValue)
        Called to indicate that a script handler resolved a value internally. The debugger can regard these as a form of trace message.
        sValueName - the name of the value that was resolved.
        oRetrievedValue - the resultant value.
      • poll

        public void poll​(ScriptHandler oScriptHandler)
        The poll() method is periodically called during the execution of a script.
        oScriptHandler - the script handler that is active.