mirror of
https://github.com/EiffelSoftware/eiffel-org.git
synced 2026-02-05 08:24:30 +01:00
Author:halw
Date:2009-01-25T23:31:24.000000Z git-svn-id: https://svn.eiffel.com/eiffel-org/trunk@168 abb3cda0-5349-4a8f-a601-0c33ac3a8c38
This commit is contained in:
@@ -1,42 +1,43 @@
|
||||
[[Property:title|Evaluation tool or Watch tool]]
|
||||
[[Property:weight|1]]
|
||||
[[Property:uuid|e70d5827-a00d-47ee-9e7a-b7b4bfb34ccf]]
|
||||
The expression evaluation tool's main part is the list of expressions that should be evaluated.
|
||||
The Evaluation (or Watch) tool displays a list of expressions and their values (provided that those values can be obtained).
|
||||
|
||||
[[Image:expression-evaluation-tool]]
|
||||
|
||||
Its first column gives the expression's text, the context's column gives the context in which the [[New expression dialog|expression]] is evaluated. The value's column gives the result of the expression, and the type's column the result's type of the expression..
|
||||
In the display, the ''Expression'' column gives the expression's text. The ''Context'' column gives the context in which the [[New expression dialog|expression]] is evaluated. The ''Value'' column gives the result of the expression, and the ''Type'' column the type of the expression's value.
|
||||
|
||||
In the screenshot, you can see various expressions, the 4th one, is a dropped object, and the debugger displayed it as itself, this is shown by the context's value "As object", and also by the italic style. The user can name the dropped object by editing the "expression" cell. This is useful to remember the origin of the value.
|
||||
In the image above, you can see various expressions. Look at the one on the fourth line. This is an object that has been dropped on to the Evaluation tool, and the tool displayed it as itself, as shown by "As object" in the ''Context'' column, and by the italic style. The user can name the dropped object by editing the value in the ''Expression'' column for the expression. This can be useful to help you remember the origin of the value.
|
||||
|
||||
The 5th expression has an error, the icon is different, and the 'value' shows there is an error, double click on it for more details
|
||||
The expression in the fifth row has an error, the icon is different, and the ''Value'' shows there is an error, double click on it for more details.
|
||||
|
||||
{{tip|If the expression returns a non-Void (and non basic type) object, then the corresponding row in the list is pickable, and can be dropped for example in the Watch tool to evaluate expression on it, or even to keep the object over the steppings. }}
|
||||
|
||||
{{tip|holding the mouse pointer over the expression's cell will popup a tooltip with details on the pointed expression }}
|
||||
{{tip|If the expression returns a non-Void (and non-basic type) object, then the corresponding row in the list is pickable. The object can be dropped, for example, on the Evaluation tool to inspect it or to keep the object visible while stepping through system execution. }}
|
||||
|
||||
|
||||
{{tip|holding the mouse pointer over the expression's cell will pop up a tooltip with details on the pointed expression }}
|
||||
|
||||
|
||||
On top of the list, four buttons can be found.
|
||||
* the button [[Image:toolbar-dropdown-icon]] is used to create/close watch tools via a menu popup
|
||||
* [[Image:debugger-auto-values]] Enable or disable auto expressions.
|
||||
* [[Image:new-expression-icon]] pops up the [[New expression dialog|expression definition dialog]] , and can be used to define new expressions. If you have selected text in the editor, this text will be used to create the expression.
|
||||
* [[Image:general-edit-icon]] edits a currently selected expression (it is not possible to change the context of an expression, only the expression itself). <br/>
|
||||
The associated key shortcut is F2.
|
||||
* [[Image:new-expression-icon]] pops up the [[New expression dialog|expression definition dialog]], and can be used to define new expressions. If you have selected text in the editor, this text will be used to create the expression.
|
||||
* [[Image:general-edit-icon]] edits a currently selected expression (it is not possible to change the context of an expression, only the expression itself). The associated key shortcut is F2.
|
||||
* [[Image:general-toogle-icon]] disable/enable the evaluation of the selected expressions from the list. <br/>
|
||||
|
||||
* [[Image:debugger-set-sizes-icon]] set the slice limits of dropped <eiffel>SPECIAL</eiffel> or <eiffel>NATIVE_ARRAY</eiffel> objects. <br/>
|
||||
|
||||
* [[Image:debugger-show-hex-value-icon]] Toggle format display of numeric between decimal and hexadecimal format. <br/>
|
||||
|
||||
* [[Image:debugger-expand-info-icon]] This command can give an [[Object Viewer (also known as Expanded display)|expanded display]] of the string relative to an object, by dropping the object onto the button (or pressing Ctrl+E on the selected value). Use it if an object has a very long string representation or a string representation that contains carriage returns, for example. <br/>
|
||||
* [[Image:debugger-expand-info-icon]] This command can give an [[Object Viewer (also known as Expanded display)|expanded display]] of the string relative to an object, by dropping the object onto the button (or pressing <code>CTRL</code>+<code>E</code> on the selected value). Use it if an object has a very long string representation or a string representation that contains carriage returns, for example. <br/>
|
||||
|
||||
* [[Image:execution-object-storage-icon]] This button is used to remotely store or load a "stored" object (check [[Debuggee's Object Storage|remote object storage]] ). <br/>
|
||||
* [[Image:execution-object-storage-icon]] This button is used to remotely store or load a "stored" object (check [[Debuggee's Object Storage|remote object storage]]). <br/>
|
||||
|
||||
* [[Image:general-delete-icon]] removes the selected expressions from the list. <br/>
|
||||
The associated key shortcut is Del.
|
||||
* And the last two buttons are used to move up and down the expressions. You can also move the expressions up and down using [CONTROL] + [-] or [CONTROL] + [+].
|
||||
* [[Image:general-delete-icon]] removes the selected expressions from the list. The associated key shortcut is Del.
|
||||
* And the last two buttons are used to move up and down the expressions. You can also move the expressions up and down using <code>CTRL</code>+<code>-</code> or <code>CTRL</code>+<code>+</code> respectively (that is, the Control key with the ''minus'' key or the Control key with the ''plus'' key).
|
||||
|
||||
{{tip|Dropping an object onto this list lets you define quickly an expression whose context is the dropped object. This avoids having to type object addresses manually. <br/>
|
||||
If you press the [Control] key during the dropping, you will add the dropped object as itself. }}
|
||||
If you hold the <code>CTRL</code> key while dropping, you will add the dropped object as itself. }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,25 @@
|
||||
[[Property:title|Expression evaluation]]
|
||||
[[Property:weight|-10]]
|
||||
[[Property:uuid|e55442ac-7861-1995-d315-baeed6c49223]]
|
||||
* [[Expression evaluation: Introduction|Introduction]]
|
||||
* [[Evaluation tool or Watch tool|Evaluation tool (alias Watch tool)]]
|
||||
* [[New expression dialog|New expression dialog]]
|
||||
[[Image:expression-evaluation-tool]]
|
||||
|
||||
The Expression evaluation tool (sometimes called the Watch tool) makes it possible to evaluate expressions while the application is stopped in the debugger. A typical use for it is the case in which you would like to know the result that an external feature would return. Since you do not have access to the C memory of the application, doing this would be impossible without the Expression evaluation tool. You might also want to know the result of an Eiffel feature whose body is too complex for you to evaluate.
|
||||
|
||||
In these cases (and any other that suits you), you should use the dynamic expression evaluation. Simply [[New expression dialog|define the expression]] and its result will be immediately available in the [[Evaluation tool or Watch tool|list of expressions]] .
|
||||
|
||||
If you keep the mouse cursor over the expression cell of line, you get a tooltip describing the expression result.
|
||||
|
||||
You can disable the evaluation of the selected expression by clicking on [[Image:general-toogle-icon]] . After you do, the context value will display 'disabled'.
|
||||
|
||||
If the expression has an error, or if the evaluation raised an exception, you can obtain a more detailed description by double-clicking on the expression row.
|
||||
|
||||
|
||||
{{caution|During the evaluation of an expression, all features that are necessary to obtain the result are called. Therefore, you should avoid calling queries that have side-effects, since doing so may alter the program execution. The Eiffel methodology recommends against creating queries with side-effects for other important reasons, as well. }}
|
||||
|
||||
{{caution|Eiffel ''agents'' (for example: <code>agent my_function</code>) are not supported is not supported. }}
|
||||
|
||||
|
||||
{{caution|Currently, for classic Eiffel systems, evaluating <code>Precursor</code> will result the current feature's result (not the precursor). }}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[[Property:uuid|95a78497-434d-759f-fdce-f9025c891495]]
|
||||
Adding new expressions to the [[Evaluation tool or Watch tool|list of expressions]] that should be dynamically evaluated is performed via a dialog.
|
||||
|
||||
<center>
|
||||
|
||||
{|
|
||||
|-
|
||||
| [[Image:new-expression-definition-dlg]] <br/>
|
||||
@@ -11,18 +11,17 @@ context: Current feature
|
||||
| [[Image:new-expression-as-object-definition-dlg]] <br/>
|
||||
context: As object
|
||||
|}
|
||||
</center>
|
||||
|
||||
|
||||
The first part in the dialog makes it possible to select the context of the expression.
|
||||
* The default context is the context of the [[Information relative to a stack element|currently selected call stack element]] . This context gives access to the locals, the arguments, the result and the enclosing object features. <br/>
|
||||
|
||||
* The object context, that requires a valid object address, gives access to the features of the selected object. But if the "As object" is selected, the result of the expression, is the pointed object it self; and you can name the object (see the second screenshot).
|
||||
* The last context, the class-related context, gives access to the once and constants features of that class. It requires a valid class name.
|
||||
* The default context is the context of the [[Information relative to a stack element|currently selected call stack element]]. This context gives access to the locals, the arguments, the result and the enclosing object features.
|
||||
* The object context, that requires a valid object address, gives access to the features of the selected object. If you select "As object", the result of the expression is the referenced object itself; and you can supply a name for the object (see the second screenshot).
|
||||
* The last context, the class-related context, gives access to the <code>once</code> and constant features of that class. It requires a valid class name.
|
||||
|
||||
|
||||
The second part prompts for the expression itself. This field supports arguments, dot calls and operators (to a certain extent), but does not support creation expressions, agents or static calls (as in "feature {<eiffel>MY_CLASS</eiffel>}.<eiffel>my_feature</eiffel>"). Genericity is partially supported. Despite these limitations, we believe the expression evaluation tool should provide you with a lot of useful functionality.
|
||||
The second part prompts for the expression itself. This field supports arguments, dot calls and operators (to a certain extent), but does not support creation expressions, agents or non-object calls. Genericity is partially supported.
|
||||
|
||||
And the "Keep Assertion Checking" checkbox is used to enable assertion checking during expression evaluation if wanted (by default assertions won't be checked).
|
||||
The "Keep Assertion Checking" checkbox is used to enable assertion checking during expression evaluation if desired (by default assertions won't be checked).
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user