Difference between revisions of "IDE Window: Evaluate/Modify"

From Free Pascal wiki
Jump to navigationJump to search
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[category:IDE Window|Evaluate/Modify]][[category:IDE Window - Debug|Evaluate/Modify]][[category:Debugging]]
+
{{IDE Window: Evaluate/Modify}}
 
 
  
 
= Important =  
 
= Important =  
Line 11: Line 10:
  
 
=== Interface ===
 
=== Interface ===
 +
:''Evaluate/Modify'' window can be displayed via Main Menu→Run→Evaluate/Modify...
 +
It is '''not''' grayed only when the executed application is '''paused'''.
 +
 
;Evaluate: Evaluates the given expression
 
;Evaluate: Evaluates the given expression
  
Line 19: Line 21:
 
;Inspect: Show the [[IDE Window:Variable Inspector|variable inspector]] for the expression. The expression can only be a property or a variable.
 
;Inspect: Show the [[IDE Window:Variable Inspector|variable inspector]] for the expression. The expression can only be a property or a variable.
  
;Use Instance class type: Objects are normally shown according to the declaration of the watched expression. Evaluating "Sender: TObject" will only show you data, that is declared in TObject. However object variables can contain objects of inherited classes. Sender may be a TForm. Using this the debugger will find the actual class of the object and display all data.  
+
;Use Instance class type: Objects are normally shown according to the declaration of the watched expression. Evaluating "Sender: TObject" will only show you data, that is declared in TObject. However object variables can contain objects of inherited classes. Sender may be a TForm. Using this the debugger will find the actual class of the object and display all data.
  
 
=== Data ===
 
=== Data ===
Line 30: Line 32:
  
 
Important note on "New Value":
 
Important note on "New Value":
:You should not attempt to modify "managed" types (strings, dynamic-array). This will lead to memory corruption.  
+
:You should not attempt to modify "managed" types (strings, dynamic array). This will lead to memory corruption.  
:There is currently no safety check in place. So you must ensure this yourself.
+
:There is currently no safety check in place, so you must ensure this yourself.

Latest revision as of 14:43, 31 January 2018

Deutsch (de) English (en) français (fr)

Important

You must setup the debugger and start the project to debug it. Only then will this window be useful.

Evaluate/Modify

EvaluateModify.png

Interface

Evaluate/Modify window can be displayed via Main Menu→Run→Evaluate/Modify...

It is not grayed only when the executed application is paused.

Evaluate
Evaluates the given expression
Modify
When the new values is set, it assigns the new value to the expression. The expression can only be a property or a variable. (Read notes on "New Value")
Watch
Add the expression to the watch list
Inspect
Show the variable inspector for the expression. The expression can only be a property or a variable.
Use Instance class type
Objects are normally shown according to the declaration of the watched expression. Evaluating "Sender: TObject" will only show you data, that is declared in TObject. However object variables can contain objects of inherited classes. Sender may be a TForm. Using this the debugger will find the actual class of the object and display all data.

Data

Expression
Enter the expression to be evaluated/modified/watched/inspected here
Result
The result of the evaluation. If the evaluation of the expression failed, an error message is shown.
New Value
The new value you want to use for a variable or property.

Important note on "New Value":

You should not attempt to modify "managed" types (strings, dynamic array). This will lead to memory corruption.
There is currently no safety check in place, so you must ensure this yourself.