Evaluate Expressions

Evaluate an expression with the Bash debugger
Evaluate an expression with the Bash debugger

Evaluate Expression... allows to to inspect the current state of your program. Once your scripts stops at a breakpoint, you can use the action Run > Evaluate Expression... to inspect it.

It works like the echo command. It evaluates and prints the expressions you enter into this dialog. That’s why you need to prefix variables with the dollar sign $ and why you need to quote string values.

Examples

Here are some examples for the evaluate expression feature:

1
2
3
4
5
6
7
$name
${name}

${name:-"Default value"}

${arrayVar[0]}
${arrayVar["element name"]}

Limitations

At this time, the evaluate expression dialog only allows to print values. It doesn’t support modifications.