Difference between revisions of "IDE Window: Watch list/ru"

From Free Pascal wiki
Jump to navigationJump to search
Line 13: Line 13:
 
Выражениями могут быть локальные или глобальные переменные, ([[GDB_Debugger_Tips/ru#.D0.A1.D0.B2.D0.BE.D0.B9.D1.81.D1.82.D0.B2.D0.B0|определенные]]) свойства или выражения паскаля (ограниченная поддержка, например, «a + 1»). [[GDB_Debugger_Tips/ru#.D0.9F.D1.80.D0.BE.D0.B2.D0.B5.D1.80.D0.BA.D0.B0_.D1.82.D0.B8.D0.BF.D0.BE.D0.B2_.D0.B4.D0.B0.D0.BD.D0.BD.D1.8B.D1.85_.28Watch.2FHint.29| Подробнее см. здесь]]
 
Выражениями могут быть локальные или глобальные переменные, ([[GDB_Debugger_Tips/ru#.D0.A1.D0.B2.D0.BE.D0.B9.D1.81.D1.82.D0.B2.D0.B0|определенные]]) свойства или выражения паскаля (ограниченная поддержка, например, «a + 1»). [[GDB_Debugger_Tips/ru#.D0.9F.D1.80.D0.BE.D0.B2.D0.B5.D1.80.D0.BA.D0.B0_.D1.82.D0.B8.D0.BF.D0.BE.D0.B2_.D0.B4.D0.B0.D0.BD.D0.BD.D1.8B.D1.85_.28Watch.2FHint.29| Подробнее см. здесь]]
  
== Data displayed ==
+
== Отображаемые данные ==
  
The display has 2 columns:
+
Данные отображаются в виде 2 столбцов:  
*Expression: The variable or expression to be watched
+
*Expression(Выражение): отслеживаемые переменная или выражение
*Value: The current value of the expression
+
*Value(Значение): текущее значение выражения
  
Entries can be double-clicked to edit them.
+
Записи можно дважды щелкнуть, чтобы отредактировать их.
  
=== Scope (Stackframe, Thread, History) ===
+
=== Область видимости (Stackframe, Thread, History) ===
  
The values are evaluated according to the scope set in the [[IDE_Window:_Threads|Thread]] and [[IDE_Window:_Call_Stack|Stack]] dialog. Default is the current Thread and top stack frame.
+
Значения оцениваются в соответствии с областью видимости, установленной в диалоговых окнах [[IDE_Window:_Threads|Thread]] и [[IDE_Window:_Call_Stack|Stack]]. По умолчанию используется текущий поток и стек вызовов верхнего уровня. Оба диалога (Stack and Frame) предлагают изменить «текущий» Frame/Thread. Окно просмотра будет следовать за этим выбором.  
Both (Stack and Frame) dialog offer to change the "current" Frame/Thread. The watch window will follow this selection.
 
  
It is also possible to select previously displayed values, using the [[IDE_Window:_Debug_History|History]] dialog.
+
Также можно выбрать ранее отображаемые значения, используя диалоговое окно [[IDE_Window: _Debug_History | History]].
  
=== Special Values ===
+
=== Специальные значения ===
 +
 
 +
;<invalid> (недействительный): Значение в настоящее время недоступно. Так бывает, если отладчик не активен или отлаживаемое приложение в данный момент не приостановлено.
 +
;<evaluating> (оценочный): Значение в настоящее время получено. Результат ожидается
 +
;<disabled> (отключенный): Выражение исключается из оценки. См. Раздел «Отключение/включение кнопок (лампочек)».
 +
;Error... (ошибочный): Значение не может быть оценено. (Ошибка в выражении или переменная недоступна в выбранной области)
  
;<invalid>: Value currently not available. Can be caused, if the debugger is not active or the debugged app not currently paused.
 
;<evaluating>: Value is currently retrieved. A result will be show soon
 
;<disabled>: The expression is excluded from evaluation. See Disable/Enable buttons (light bulbs)
 
;Error...: The value could not be evaluated. (Error in Expression or Variable not available in selected scope.
 
 
 
== Interface ==
 
== Interface ==
  

Revision as of 14:42, 2 September 2020

Deutsch (de) English (en) русский (ru)

Важно

Вы должны настроить отладчик и запустить проект для его отладки. Только тогда это окно будет полезно. Чтобы открыть список наблюдения, нажмите Ctrl + Alt + W.

Список наблюдения

Watch List.png

«Список наблюдения» показывает значения переменных и выражений ("watches"), когда отлаживаемое приложение приостановливается (например, достигнута точка останова).

Выражениями могут быть локальные или глобальные переменные, (определенные) свойства или выражения паскаля (ограниченная поддержка, например, «a + 1»). Подробнее см. здесь

Отображаемые данные

Данные отображаются в виде 2 столбцов:

  • Expression(Выражение): отслеживаемые переменная или выражение
  • Value(Значение): текущее значение выражения

Записи можно дважды щелкнуть, чтобы отредактировать их.

Область видимости (Stackframe, Thread, History)

Значения оцениваются в соответствии с областью видимости, установленной в диалоговых окнах Thread и Stack. По умолчанию используется текущий поток и стек вызовов верхнего уровня. Оба диалога (Stack and Frame) предлагают изменить «текущий» Frame/Thread. Окно просмотра будет следовать за этим выбором.

Также можно выбрать ранее отображаемые значения, используя диалоговое окно History.

Специальные значения

<invalid> (недействительный)
Значение в настоящее время недоступно. Так бывает, если отладчик не активен или отлаживаемое приложение в данный момент не приостановлено.
<evaluating> (оценочный)
Значение в настоящее время получено. Результат ожидается
<disabled> (отключенный)
Выражение исключается из оценки. См. Раздел «Отключение/включение кнопок (лампочек)».
Error... (ошибочный)
Значение не может быть оценено. (Ошибка в выражении или переменная недоступна в выбранной области)

Interface

Toolbar

debugger power.png Power
Enables/Disables all updates. This does not affect the enabled/disabled state of individual watches. This will freeze the current display.
laz add.png Add
Add a new expression. This will open the Watch property dialog. (It is also possible to double click an empty line in the list)
debugger enable.png Enable/debugger disable.png Disable
Enables/Disables individual watches from evaluation. This can be used to prevent spending time on evaluation, if a watch is not available in the current scope.
laz delete.png Remove
Deletes the selected Watch(es)
debugger enable all.png Enable all/debugger disable all.png Disable all
Enables/Disables all watches from evaluation.
menu clean.png Delete all
Cleans the list
menu environment options.png Properties
Change the expression or properties of the current/selected watch. (Also possible by double clicking the watch)

Context menu

Watch List popup.png

Additional to the above functionality the context menu allows to:

Inspect
Opens the current watch in the Debug-Inspector
Evaluate/Modify
Opens the current watch in the Evaluate/Modify window
Create Data/Watch Breakpoint
Opens the dialog to create a new watchpoint based on the current watch (stop if wachted value is changed or accessed)
Copy Name
Copies the expression to the clipboard
Copy Value
Copies the value to the clipboard


Watch Properties

Watch Properties.png

Expression
An expression for which the evaluated value should be shown. Expressions can be local or global variables, (certain) properties, or pascal expressions (limited support, e.g. "a+1").
Repeat Count
Can be used to get array slices. The watch specifies the first element of the array "A[7]" (must have an index). With a "Repeat count" of 20, this shows A[7] to A[26]. It can also be used with a dynamic array (no index given). Then it specifies haw many elements to show, beginning with Item[0].
Digits
Not implemented.
Enabled
See Enable/Disable above.
Allow function calls
Not yet supported.
Use Instance class type
Objects are normally shown according to the declaration of the watched expression. Watching "Sender: TObject" will only show you data that is declared on 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.
Style
How to display the data. If a style can not be applied, default will be used.

See Also