How to use Revise to track a local script

Hi, I have a local myfile.jl file that contains some julia code that do some one-time computations. I don’t want to bother to turn it into a package, so I use e.g., include("./myfile.jl") to have access to its variables in the REPL, including functions that modify certain variables in the space, or even a module that contains some members hidden from the exterior space. I would like to use Revise to keep track of its changes but can’t seem to make it work ,e.g., Revise.track("./myfile.jl") does not work. I attempted push!(LOAD_PATH,".") as suggested by some old online resources, but did not work … So is there a way? I’m using Julia 1.9 on WSL ubuntu 20.04.

Have you tried Revise.includet? (see also the limitations mentioned at User reference · Revise.jl)

1 Like

Thank you for the tip. It seems includet() works only for function changes, e.g., if you call a changed function, the behavior changes. However, variables defined in the module cannot be updated.

Yes, this limitation is mentioned in the documenation.