Starting the ACT Debugger

Before starting the ACT Debugger, first use the Extension Manager to install and load the extensions that you want to debug. Also ensure that debug mode is enabled. Otherwise, debugging options won’t be available to you.

Because the ACT Debugger performs product-specific initialization, always start it from the Ansys product where you intend to execute the extension. This ensures that the debugger attaches to the correct process. For example, assume that you start the debugger from the Workbench Project tab and then try to debug an extension that is meant to be executed in Mechanical. Because you did not open the debugger from Mechanical, you cannot debug the Mechanical extension.

When the extension is to execute from the Workbench Project tab, start the debugger using one of the following methods:

  • From the Workbench menu, select Extensions > Open ACT Debugger.

  • From the ACT Start Page, click ACT Debugger.

     

When the extension is to execute from DesignModeler, in the ACT Development toolbar, click the button for starting the debugger. In the following figure, this is the third button.

 

When the extension is to execute from Mechanical, in the ACT Development group on the ribbon's Automation tab, click the button for starting the debugger. In the following figure, this is the third button.

 

Once the debugger starts, the Sources pane displays a folder for each loaded extension, which contains its XML file and IronPython scripts. If you expand a folder and click a file, you can see and edit this file in the pane to the right.

To begin debugging a loaded extension, you expand the folder for the extension, click a script, and then set breakpoints. When you click the button in the debugger toolbar for attaching to the Ansys product where the extension is to execute, the debugger begins listening to this product as it executes the underlying scripts. By viewing this product next to the debugger, you can observe the run-time behavior of the attached extension to reproduce unexpected behaviors, investigate issues, and test script changes.

The debugger allows you to execute the extension while inspecting the logic and memory of the script, step by step, directly in the source file. You can pause execution at breakpoints, explore and edit variables, browse the stack of function calls, and even change the script.