Difference between revisions of "IDE Window: Debug History"

From Lazarus wiki
Jump to navigationJump to search
Line 32: Line 32:
 
;[[File:debugger power.png]] Power: If powered off, now history entries will be created.
 
;[[File:debugger power.png]] Power: If powered off, now history entries will be created.
 
;[[File:debugger enable.png]] Enable: Indicates/Toggles, if history is shown in other windows. Uses the history entry last set by double click
 
;[[File:debugger enable.png]] Enable: Indicates/Toggles, if history is shown in other windows. Uses the history entry last set by double click
;[[File:clock.png]]/[[File:camera.png]] Choose list: Selects list of snapshot. [[File:clock.png]] Automatically selected Snapshots, taken at each step/pause (if power=on). Contains up to the last 25 entries. [[File:camera.png]] User selected snapshots or snapshots by watches with "take snapshot" option. The list is not limited.
+
;[[File:clock.png]]/[[File:camera.png]] Choose list: Selects list of snapshot. [[File:clock.png]] Automatically created entries, created at each step/pause (if power=on). Contains up to the last 25 entries. [[File:camera.png]] User selected snapshots or snapshots by watches with "take snapshot" option. The list is not limited.
 
;[[File: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.
 
;[[File: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.
 
;[[File:laz delete.png]] Remove: Deletes one entry from the current list.
 
;[[File:laz delete.png]] Remove: Deletes one entry from the current list.
 
;[[File:menu_clean.png]] Delete all: Deletes all entries from the current list.
 
;[[File:menu_clean.png]] Delete all: Deletes all entries from the current list.
 
;[[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 =

Revision as of 19:49, 28 June 2012


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.


Limitation

  • 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 snapshot was taken. This does not indicate how much time the app was runnig, 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.

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