Skip to main content
mohank0008
April 12, 2024
Solved

CONSOLE TO PRINT THE DATA OF LOCAL VARIABLE

  • April 12, 2024
  • 11 replies
  • 0 views

Is there any feasability to print the value of a local variable in the runtime & the value it has in the console.  (Like other programming languages for debugging)

Best answer by karumurua531442

Hi [mention:7512a2ef378b4c43b97ae5b058da940b:e9ed411860ed4f2ba0265705b8793d05]  what is your requirement initially,  why would you like to print value in runtime. AFAIK I wouldn't be possible print the value of a local variable directly  during runtime. Appian doesn't provide a built-in console for real-time debugging.

11 replies

shubhama926776
April 12, 2024

Can you tell me where you expect runtime values in the code, and What do you want to achieve it? An example would be great.

karumurua531442
April 12, 2024

Hi [mention:7512a2ef378b4c43b97ae5b058da940b:e9ed411860ed4f2ba0265705b8793d05]  what is your requirement initially,  why would you like to print value in runtime. AFAIK I wouldn't be possible print the value of a local variable directly  during runtime. Appian doesn't provide a built-in console for real-time debugging.

mohank0008
April 18, 2024

I don't have any specific requirement for that; I was just wondering if it exists.

While performing actions on the site, we can observe the values that local variables hold and how routing occurs based on the print statements.

Runtime printed values aid in faster debugging.

Hopefully, this tool will evolve to include a console in upcoming releases.

shubhama926776
April 18, 2024

 [mention:7512a2ef378b4c43b97ae5b058da940b:e9ed411860ed4f2ba0265705b8793d05]  Understood your requirement.
No built-in console printing for local variables, but workarounds exist
Display value in Interface, Add text/paragraph component showing the variable value(Mostly developer follow this for interface debugging)

stefanhelzle0001
April 12, 2024

What kind of variables and which runtime do you mean?

prakhars0731
April 13, 2024

If you are saying that in expression rule you want to get an output through localvarible yes that is possible but I am not sure what do you mean by runtime

April 14, 2024

you may do it like

a!localVariables(

local!a: 4,

local!b: 5,

local!c: local!a +local!b,

local!c

)

this will print the local!c in the output in expression rule

June 11, 2024

[mention:b45a4f6a20b14a008e4e0ec732a8bf98:e9ed411860ed4f2ba0265705b8793d05]  and [mention:dea33493db6342c9a73dc108d45120c0:e9ed411860ed4f2ba0265705b8793d05]  already explained different ways of debugging.

In addition, If you want to print local variable value in logs, you can try logmessage plug-in (community.appian.com/.../log-a-message).

a!localVariables(
  local!data: "Message printed by logmessage function..........",
  local!info: logmessage("ERROR", local!data),
  local!data
)

Output:

The following will be printed in tomcat-stdOut.log file:
2024-06-11 07:24:30,614 [http-nio-8080-exec-995] ERROR com.incessant.plugins.logMessageMain.LogMessage - Message printed by logmessage function..........

I hope this helps.

mohank0008
February 1, 2026

Server Error in '/' Application.


Runtime Error

Description: An exception occurred while processing your request. Additionally, another exception occurred while executing the custom error page for the first exception. The request has been terminated.

[mention:c3d4bf332aba4695885fdc0e0110ec6e:e9ed411860ed4f2ba0265705b8793d05]  - I could not access the link

stefanhelzle0001
February 1, 2026

The search function in the app market returned this updated link:

community.appian.com/.../log-a-message