I know this struggle well and have made several posts on this forum about it. Here are a few tips:
-
Make your functions smaller. A full script should probably not be converted into a single function but rather a series of smaller function calls. It is easier to check and write tests for smaller functions and smaller subsets of inputs and outputs.
-
The fastest method to get what you want is to temporarily write the
global
keyword in front of intermediate variables you want to check after the function finishes executing. -
Infiltrator.jl can drop you into a REPL in the context of a local function. Then you are free to explore and manipulate variables from there.