Browsing Script Procedure and Function Calls with the Call Stack Panel in Altium Designer

您正在阅读的是 20.2. 版本。关于最新版本,请前往 Browsing Script Procedure and Function Calls with the Call Stack Panel in Altium Designer 阅读 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.

软件的功能取决于您购买的Altium产品级别。您可以比较Altium Designer软件订阅的各个级别中包含的功能,以及通过Altium 365平台提供的应用程序所能实现的功能。

如果您在软件中找不到某个讨论过的功能,请联系Altium销售团队以获取更多信息。

Content