Recently upgraded to spyder 4.1.5, and since then variables are not saved in the variable explorer between runs, if I use F5. If a mark the code and use F9 instead it can access all the variables in the variable explorer.
I have the following settings: Console: Execute in current console Working directory settings: The current working directory
I have not selected the "Remove all variables before execution" setting.