DISCLAIMER: The following code uses unsupported functions by Appian. Do not promote the functions used in this post to any end user facing application. Please remember to always follow best practices recommended by Appian when building applications.
In Appian development, there is a need for debugging in the lower environments. Sometimes, replicating issues and identifying the problem can be very difficult in the appian platform. Luckily, there is a utility object we can build that can help us see the data within the interface.
What we are building
We are building a debug box. This box will be able to display data that is within interface objects.

How to use it
Say we have an area in the App that we are working on that is causing some trouble. We can place this in the interface object and see the box in the frontend. We can then display data by typing SAIL code which will display the results.
For example, we will use the Net Zero Carbon Reporting application from the community edition.
I will place the debug box within the object NZ_CreateCase

Now when I go to the frontend I will see the following

Now within this box I can type in the name of the rule inputs and quickly see their values to recreate in my interface object in order to recreate this exact data in the object designer.

Now with this data I can see the data and quicky recreate the data in the designer view.

By doing this, this has saved me time instead of having to look directly in the database in order to get the right data to set up my test case in the designer view. I was able to see the case ID for that specific data in the box.
The code for the Debug Box
a!localVariables(
local!expression: "",
a!cardLayout(
showBorder: true,
decorativeBarColor: "WARN",
decorativeBarPosition: "START",
contents: {
a!paragraphField(
label: "DEBUG BOX",
value: local!expression,
placeholder: "What would you like to know?",
saveInto: local!expression
),
a!paragraphField(
label: "Results",
value: try(eval(local!expression), fn!lasterror()),
readOnly: true,
showWhen: a!isNotNullOrEmpty(local!expression)
)
}
)
)
NOTE - PLEASE REVIEW
As you can see there are some functions that are not supported. The most important is
eval()
The eval function is used to evaluate sail code. This can be very dangerous if this function is deployed to an end user as it givens them ability to execute unknown sail code in the environment.
Please be very careful to not deploy the debug box to any higher environments.
As for the try and last error function, these are also unsupported but will be able to see if the code you placed in the debug box caused an error. For example,

Also here is demonstrating that this does evaluate any SAIL code.

Conclusion
This tool can be very helpful but use with caution. Do not promote to higher environments to end users and always be sure to follow best practices suggested by Appian.
Please let me know if you found this helpful.