Interactive Shell

◷ Reading Time: 4 minutes

The interactive shell is a command-line interface that allows executing expressions and viewing data.

Open the Interactive Shell

In the Designer, if you navigate to Debug, you will see the option, Interactive Shell.

Or you can click on the Interactive Shell icon.

Executing Expressions

The interactive Shell allows executing expressions. Especially, in your project, if you want to try an expression before adding it as a part of the project, you can try it in the shell and check whether it gives the expected results.

The function help content is available if you want to use any built-in functions. You can simply double-click on the function to be inserted into the shell.

You can also use the watch.

Shell provides text-based table viewer for data. And you can use print() to view the output.

Shell Commands

The interactive shell also provides capabilities to run commands such as displaying data on the data viewer.

Help Content

You can use help options to view the available commands.

Use /cmds to view the available commands.

Shell screen 1

Use -help argument with the command that you want to learn further.

For example, /show -help shows the options for show command.

Screen 2 for Shell

And also Interactive Shell supports managing history in /cls and /show commands

Dump Command

You can use the dump command to dump events or running project information to a file.

dump file shell

Before use this dump command, you need to run or debug your project and send the parameters to Shell.

Dump Execution Events

/dump --events allows you to dump events to a JSON file.

/dump --events d:\profiler\event.json

Dump Project Info

/dump --project allows you to dump the running project information to a JSON file.

/dump --project d:\profiler\ProjectFile.json
dump project

Running a Command

You can run a command using the given options for a particular command.

For example, to see the content of a file, you can use the following commands.

To assign the content to a variable:

JsonContent := fileReadText(<File Path>)|asJson()

To view the content in data viewer:

/show JsonContent -d
Updated on February 8, 2023

Was this article helpful?

Related Articles