Difference between revisions of "IDE Window: Debug History"

From Lazarus wiki
Jump to navigationJump to search
(Fix heading levels; add navigation)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{IDE Window: Debug History}}
 
{{IDE Window: Debug History}}
  
= Important =  
+
== Navigation ==
 +
 
 +
[[Main menu|Main Menu]] > [[Main menu#View|View]] > Debug Windows > History
 +
 
 +
== Important ==  
  
 
You must [[Debugger_Setup |setup the debugger]] and start the project to debug it. Only then this window will be useful.
 
You must [[Debugger_Setup |setup the debugger]] and start the project to debug it. Only then this window will be useful.
  
= Debug History =
+
== Debug History ==
  
 
[[File:History.png]]
 
[[File:History.png]]
Line 13: Line 17:
 
Each time an entry is added locals, watches, stack and threads that are shown/evaluated at the time are stored. The history window allows to select each entry and view the stored values. Stored values can be viewed in there normal viewer windows (e.g. Watch window) which will follow the selection of the history window.
 
Each time an entry is added locals, watches, stack and threads that are shown/evaluated at the time are stored. The history window allows to select each entry and view the stored values. Stored values can be viewed in there normal viewer windows (e.g. Watch window) which will follow the selection of the history window.
  
 
+
== Limitations ==
= Limitation =
 
  
 
* The history only affects Watches, Locals, Threads, and Stack Window.
 
* The history only affects Watches, Locals, Threads, and Stack Window.
Line 21: Line 24:
 
* Data evaluation can be aborted, if the user runs or steps the application before the data is ready. In this case it is not available in the history
 
* Data evaluation can be aborted, if the user runs or steps the application before the data is ready. In this case it is not available in the history
  
= Data Displayed =
+
== Data Displayed ==
  
* The time when the snapshot was taken. This does not indicate how much time the app was runnig, as it includes paused time.
+
* The time when the entri was taken. This does not indicate how much time the app was running, as it includes paused time.
 
* The location: if available method name (format depends on type of debug info), and source line. This refers to the thread that was active at the time.
 
* The location: if available method name (format depends on type of debug info), and source line. This refers to the thread that was active at the time.
  
= Interface =
+
== Automatic entries vs (User-taken-) Snapshots ==
 +
 
 +
The main list automatically has an entry added for every time the debugger pauses the app. This list will also remove older entries and keep only the last n entries.
 +
 
 +
The 2nd list contains only entries the user selected. Those entries are kept until after the end of the debug session.
 +
Entries can be added to this list by either the snapshot button, or the breakpoint-property "take snapshot".
 +
 
 +
== Interface ==
  
 
;Double click: Selects or deselects an entry. If an entry is selected, then [[IDE_Window:_Watch_list|Watch list]], [[IDE_Window:_Local_Variables|Local variables]], [[IDE_Window:_Call_Stack|Stack]] and [[IDE_Window:_Threads|Thread]] show the history content.
 
;Double click: Selects or deselects an entry. If an entry is selected, then [[IDE_Window:_Watch_list|Watch list]], [[IDE_Window:_Local_Variables|Local variables]], [[IDE_Window:_Call_Stack|Stack]] and [[IDE_Window:_Threads|Thread]] show the history content.
Line 37: Line 47:
 
;[[File:laz_save.png]]/[[File:laz_open.png]] Export/Import: Exports/Imports all entries, including the values for the watches, locals, stack and threads
 
;[[File:laz_save.png]]/[[File:laz_open.png]] Export/Import: Exports/Imports all entries, including the values for the watches, locals, stack and threads
  
= See also =
+
== See also ==
 
 
  
 
* [[IDE_Window:_Watch_list|Watch list]]
 
* [[IDE_Window:_Watch_list|Watch list]]

Latest revision as of 08:25, 1 February 2021

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

Navigation

Main Menu > View > Debug Windows > History

Important

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

Debug History

History.png

The History window shows a list of locations where the application was previously stopped or paused. (e.g. Hit Breakpoint, stopped after stepping). Entries can also be added by none-breaking Breakpoints.

Each time an entry is added locals, watches, stack and threads that are shown/evaluated at the time are stored. The history window allows to select each entry and view the stored values. Stored values can be viewed in there normal viewer windows (e.g. Watch window) which will follow the selection of the history window.

Limitations

  • The history only affects Watches, Locals, Threads, and Stack Window.
Other Windows are not affected. Not affected windows keep showing the current data while a history entry is selected
  • Only Watches and Locals in the top stackframe of the current thread are automatically evaluated (available, even if the related viewer windows were closed). Other data is only kept, if it was displayed at the time. (e.g. if the user manually selected another frame, and viewed the watches in the watch window.
  • Data evaluation can be aborted, if the user runs or steps the application before the data is ready. In this case it is not available in the history

Data Displayed

  • The time when the entri was taken. This does not indicate how much time the app was running, as it includes paused time.
  • The location: if available method name (format depends on type of debug info), and source line. This refers to the thread that was active at the time.

Automatic entries vs (User-taken-) Snapshots

The main list automatically has an entry added for every time the debugger pauses the app. This list will also remove older entries and keep only the last n entries.

The 2nd list contains only entries the user selected. Those entries are kept until after the end of the debug session. Entries can be added to this list by either the snapshot button, or the breakpoint-property "take snapshot".

Interface

Double click
Selects or deselects an entry. If an entry is selected, then Watch list, Local variables, Stack and Thread show the history content.
debugger power.png Power
If powered off, now history entries will be created.
debugger enable.png Enable
Indicates/Toggles, if history is shown in other windows. Uses the history entry last set by double click
clock.png/camera.png Choose list
Selects list of snapshot. clock.png Automatically created entries, created at each step/pause (if power=on). Contains up to the last 25 entries. camera.png User selected snapshots or snapshots by watches with "take snapshot" option. The list is not limited.
camera add.png Add to selected snapshot list
Adds the current entry to the user selected list. The entry remains in the automatic list, until it is replaced by newer entries.
laz delete.png Remove
Deletes one entry from the current list.
menu clean.png Delete all
Deletes all entries from the current list.
laz save.png/laz open.png Export/Import
Exports/Imports all entries, including the values for the watches, locals, stack and threads

See also