I like to execute code line by line with CTRL/SHIFT +Enter (rather than F5 Debug)
I often begin a function with two lines of the form
global X = (; function_inputs )
(; function_inputs) = X
So if an error occurs I can run the second line to recover the function inputs, then run line by line with CTRL+Enter.
Is it possible to recover the function inputs without these two lines?
It sounds a bit like Debugging code from the REPL.
But it seems that whatever you do, you need to manually mark those functions where you want to be able to recover the inputs from. (Obviously, Julia cannot keep a history of all inputs from all functions.)
Following your style, you could probably define a macro such that functions are defined like @track f(x) = x^2
will automatically track their input history somewhere…