Stay in -i REPL after ERROR?



I am debugging my first Julia script with the -i flag.
After an Error, the interactive REPL exits.
Is there a way to remain in the repl to examine the variables, definitions, etc. that caused the error?
Thank you!


from a julia REPL call include("my_script.jl").


Thank you!
My scripts usually have command line arguments. I suppose I could split the scripts in two parts (one to parse the arguments, one to include).


I am not sure how to handle command line arguments with include, but command line arguments get saved in a variable called ARGS, you could just set it yourself.

E.g. try running this from your shell:

julia -e "@show ARGS" input1 input2

you can set ARGS from inside julia simply by

ARGS = String["input1", "input2"]


Thank you.
That does not solve my problem with running scripts with -i though.
Should I open an issue on Github?


no Idea what the intended behavior o the -i option is, someone else has to answer this.


Exactly, you can just do

ARGS = split("hello world 3 4 5")

and it will behave as if you did

> julia my_script_that_parses_ARGS.jl hello world 3 4 5

from the command line.