As an answer I cite here the page M-: (info "(elisp)Eval List")
of
emacs-version
: GNU Emacs 26.2 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30) of 2019-04-12
(the feature is actually rather old)
You can use the “evaluation list buffer”, called ‘edebug’, to evaluate
expressions interactively. You can also set up the “evaluation list” of
expressions to be evaluated automatically each time Edebug updates the
display.
‘E’
Switch to the evaluation list buffer ‘edebug’
(‘edebug-visit-eval-list’).
... There follows much more info on the corresponding info manual page.
Especially the evaluation lists should be interesting for you:
The expressions you enter interactively (and their results) are lost when you continue execution; but you can set up an evaluation list consisting of expressions to be evaluated each time execution stops.
To do this, write one or more evaluation list groups in the evaluation list buffer. An evaluation list group consists of one or more Lisp expressions. Groups are separated by comment lines.
The command C-c C-u (edebug-update-eval-list) rebuilds the evaluation list, scanning the buffer and using the first expression of each group. (The idea is that the second expression of the group is the value previously computed and displayed.)
e
to eval any expression in the current context.*Messages*
buffer.