Expressions

An expression is a snippet of code that can be evaluated to produce a value. The context for an expression depends on the particular debug model. Some expressions may need to be evaluated at a specific location in the program so that its variables can be referenced. IExpression defines a general interface for debug expressions.

An expression manager (IExpressionManager) keeps track of all of the expressions in the workspace. It will also fire events to interested listeners as expressions are added, removed, or changed.

Expressions can be used to implement "inspectors," or "scrapbooks" that let users evaluate code snippets. The Java tooling uses expressions to implement the expression generated when the user inspects the source code.

A watch expression is an expression that is repeatedly evaluated as the program executes. IWatchExpression defines a specialized kind of IExpression that updates the value of the expression when supplied with a new debug context. Watch expressions are used to implement "watch lists," which show changes in the value of an expression as the program executes.