Call Stack Panel

Now reading version 20.2. For the latest, read: Call Stack Panel for version 22
 

Parent page: Working with Panels

The Script Editor's Call Stack panelThe Script Editor's Call Stack panel

Summary

The Call Stack panel is used to view the chain of procedures and functions that have led to the current point of execution in the script being debugged.

Panel Access

From the Scripting Editor, the panel can be accessed in the following ways:

  • Click View » Panels » Call Stack
  • Click the Panels button at the bottom-right of the workspace and select the Call Stack option.

Content and Use

As you step-debug your script, the panel will show the name of any function or procedure that you enter.

When a call to another function or procedure is encountered, the panel will show the name of this additional function/procedure as it is entered. As the function/procedure is called from within a function/procedure, the original function/procedure is still displayed in the panel.


A 'call stack' is effectively set up, showing the relationship between descendant function/procedure calls. The original function/procedure appears at the bottom of the stack, with each subsequently called function/procedure above it, right up to the currently entered function/procedure on the top of the stack.
As script execution drops out of a sub-function/procedure and passes back into the calling function/procedure, the former will be removed from the stack and the calling function/procedure will become the top of the stack.
Double-clicking on an entry in the panel will jump to the corresponding line of script in which the call to the selected function or procedure is made. The line will be highlighted in the color associated with scripting errors and will have the scripting error marker displayed in the right-hand margin. This is purely used for highlighting purposes. It will disappear when you click on the document and does not inhibit the debug session in any way.
This can also be a quick way of defining the next point that you wish to run code execution to, using the Run To Cursor command available from the Run menu or Script Debug toolbar [shortcut: CTRL + F9].

The keyboard shortcuts Up Arrow (or Left Arrow), HOME, END and Down Arrow (or Right Arrow), can be used to select the previous, first, last and next entry in the stack, respectively

 

If you find an issue, select the text/image and pressCtrl + Enterto send us your feedback.
Note

The features available depend on your Altium product access level. If you don’t see a discussed feature in your software, contact Altium Sales to find out more.

Content