Evaluate Expressions

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

Evaluate Expression... allows you to inspect the current state of your program. When your script 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 of expression evaluation:

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

${name:-"Default value"}

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

Limitations

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

© 2020–2024 Joachim Ansorg
声明
隐私政策
许可条款