Skip to main content
Skip table of contents

Debugging Rules in AppBase Studio

Summary

AppBase developers spend a significant portion of their time developing and debugging rules. To improve comfort and quality, AppBase 7.1 R3 redesigns the user interface and functionality of the rule debugger.

The rule debugger opens in a separate tab.

There can be only one instance of the rule debugger for each rule. If you try to reopen a debugger rule, the previously opened debugger becomes active.

or

the rules debugger opens in a tab

Redesigned User Interface

Added numbering of rules source code lines

When the rule is executed, the code of all C# rules wraps around additional code to connect additional libraries, logging, etc. For easy stack tracing, the numbering of C# rule lines is shown with an offset. 

Added panel collapsing and expanding

Panel collapsing

Panel expanding

Maximizing a results panel

Minimizing a results panel

Added panel resizing 

Added syntax highlighting

Implemented a syntax highlighting of the rule code, depending on the type of rule (C# or SQL) 

New Functionalities

Button "Save body & Run"

Added button "Save rule body & Run.” If pressed, the rule’s body is saved, and the rule is automatically executed.

Rule code formatting

To format the rule code (automatic indent), click the brackets icon ({}) at the bottom (Format Code).

Rule result formatting

To manually format the rule results in JSON, click the "Format сode" button

To automatically format the JSON result of a rule, turn on the "Auto format rule result after rule execution complete" switch.

Auto expand rule result panel

If the result panel is collapsed and the "Auto expand result panel after rule execution complete" switch is enabled, the result panel will automatically expand.

Rule execution logs

If the AppBase is configured and enabled to save logs to the ELK stack, the rule debugger can view the logs of the rule's execution. To view the logs, execute the rule, open the "Logs" tab, and click the "Refresh" button.

IMPORTANT Meaning that the logs are indexed with a delay.

Log filtering

The following switches are used to filter logs:

Switch

Description

Show Critical logs

Show Error logs

Show Warning logs

Show Information logs

Show Debug logs

Show Trace logs

Show log records with normalized rule body only. All other filtering parameters will be ignored

Show log of current run only

Known Issues

"Debug Properties" layout

This is due to the peculiarities of the EXT.NET 1.7 TriggerField component when the trigger button is hidden. To be fixed in future versions.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.