Script debugging

To debug a script use the Script editor which can be opened as follows:

The only requirement to start debugging a script is the following:

After switching the script to the debug mode it is necessary to wait for suspending the execution of script actions. Then you can monitor:

The toolbar of the Script editor contains the following buttons used to debug a script:

Button Description

Start
event - Starts the event instance and stops before the first action is executed
active picture - disabled for active pictures

Stop
Stops the script debugging. If the debugging has been started by clicking the button (Start), clicking the button stops the script execution and a forced termination log will be written into the log database. If the debugging has been started by clicking the button (Attach to running script), given instance keeps the execution of script actions.

Wait for
Launch
Command waits until the script is running and the script debug conditions are met. Once the conditions are met, the script is to be switched to the debug mode and its execution stops at the first action.
The script debugging conditions are specified in the following dialog box:



The script is switched to the debugging mode after the given number of starts is reached. The number includes either all script (regardless of instance - the parameter Only for instance is not enabled) or just the script of defined instance (the parameter Only for instance enabled and an instance number specified).

 For selection of the specific D2000 Event or D2000 process intended for ESL script debugging push SHIFT button and click on option (button):
   - Wait for Launch
   - Attach to running script

The window used for process selection for debugging opens after this.




As regards Server event, which has been started in *.HIP process by OPENEVENT script action, you should define on which side it has been started (LOCAL - script started on the client side - HI, REMOTE - script started on the server side - SEE).

Note: Physical instance for objects of Event type and logical instance for active pictures.


Attach to running
script
 
The Script editor is attempting to switch the script to the debug mode. If successful then the script execution is either suspended or the Script editor is waiting until first event is executed in order to suspend the execution. The next progress of the Script editor is regular. If the script is opened several times (various instances) within respective process, the Script editor automatically displays their list.

list of instances

Instance Logical instance number - the instance number the object has been open with.
Instance number can be retrieved by the %HI_GetSelfInstanceId (for active pictures only) or %GetSelfInstanceId functions.
Info Not implemented yet.
HOBJ Object instance HOBJ.
Instance number can be retrieved by the %GetSelfHBJ function.
D2000 Server instance Physical instance number of the object in D2000 system - used by process D2000 Server.
Physical instance number can be retrieved by the %HI_GetSelfInstanceId (for active picture only) or %GetSelfInstanceId functions.
Internal instance Instance number used by the script interpreter - internal unique identifier.
Its values can be retrieved by the %GetEventInstanceId function.

Note: The functions listed in the HOBJ and D2000 Server instance rows require for their functionality the name of the script interpreter to be specified (i.e. D2000 Event Handler for object of Event type or D2000 HI for active picture).

0 komentárov

Nie ste prihlásený. Akékoľvek zmeny, ktoré vykonáte, sa označia ako anonymné. Ak už máte svoj účet, pravdepodobne sa budete chcieť prihlásiť .