Most errors can be detected in the INFO system in /Errors/Script. Each error is listed with description, the row and column number in the script.
Some errors in the script can be more "tricky". For example the error can be of semantic origin instead of syntactic, i.e. the script is running, but not exactly the way it should be.
The cause of such error the Pm.Debug method can be used (or the Pm.InfoLogAdd method) and e.g. so-called "interval bisection". It means that somewhere in the application this method is placed into the script (together with the tuning remark as a first parameter). Then it is possible to check the script completion in the running application and see the "tuning remark" in the INFO system in Debug_info. This information can be useful in order to decide whether the error occured in the script before or after the remark.
The Pm.Debug method and the Pm.InfoLogAdd method works also in the Web client and the report can be viewed after pressing Shift-Ctrl-Alt-space simultaneously in Web panel (or after pressing the F12 key while in the "Console" page).
Script errors often occur in the onStart event of the Pmg object that reads or writes into another Pmg object based on this event. The cause of such error is the fact that the other Pmg object is not initialized at the moment of executing this event. This is the panel Pmg object order error that can be avoided by placing such Pmg object (that contains the script) above all others (i.e. select the Pmg object, right mouse button and go to menu "Selected Pmg objects / Move selected Pmg objects by order in memory / above all objects").
The global errors can be written into the "Application.ini" file. This kind of error log can be set in the "Application.ini" file in the [Log] section. The LOG file can then be explored long after the application is running or stopped. The error log is preset to record only the first occurrence of errors of each type.