Article Details
Id:18839
Product:finPOWER Connect
Type:NEW
Version:3.04.03
Opened:29/11/2021
Closed:07/12/2021
Released:01/02/2022
Job: J027902
High Importance

Script Debugger added

Scripts now support Debugging. This is useful to delve into script code whilst it is running, and then trace code and examine variables etc.

You will need to install a debugger - we suggest you use Visual Studio 2022 Community Edition. See https://visualstudio.microsoft.com/vs/community/.

To turn on debugging, go to Tools, User Preferences, Developer group, General page and check "Enable Debugger facility?".

Next, add finBL.DebugLaunch() to a script where you want to open the debugger. Note, this may prompt you to choose a debugger if multiple are installed.

Within the debugger, the script code will be opened and paused at the DebugLaunch line.

The debugger allows breakpoints to be added, variables inspected (and altered), code step throughs, move next line to run etc.

NOTE: Currently the Developer group will only appear on the User Preferences form if licensed for the Portals Add-On. This restriction will be removed in the next release.

NOTE: You cannot edit code in the Debugger.

NOTE: If the script, or an included Function Library, is encrypted the Debugger will not show code.

WARNING: When debugging script code, the code is saved to the Temporary folder for the session and is therefore a security risk. This folder should be deleted when finPOWER Connect is closed normally.

WARNING: Make sure you turn off the Debugger facility when finished and remove or comment out finBL.DebugLaunch() statements in code.