Description
From a comment from Mira on our marketplace reviews. This is my interpretation of what their feedback was.
- Open folder A, then launch an instance of the Interactive Window (Jupyter: Create Interactive Window)
- Do some work there by entering Python commands in the input box.
- Create and open folder B in the same instance of VS Code.
- Reopen folder A again in the same instance of VS Code
Expected
The state of the interactive window opened and edited in step 2 is still available.
Actual
The interactive window is gone along with commands that had been entered.
Notes
The Interactive Window was designed to be an execution environment for writing Python scripts in a manner similar to that of creating a notebook. However, the design of the IW is geared more toward acting like a REPL or Python Terminal, so naturally its state is not saved when VS Code is closed or a new folder is opened.
Because the Interactive Window looks like a notebook, it seems reasonable to assume that many users will expect the state to either 1) be persisted or 2) warned about losing when the window is closed.
Marked as "important" due to the fact this can be interpreted as a data loss scenario.
Possible behavior changes
- Consider providing a warning to users if an interactive window is opened that wasn't associated with a Python script.
- Consider offering to save the IW as a notebook.
- Automatically save the IW as a notebook or otherwise be persisted and re-established on loading a particular workspace.
- Automatically save at least the command list that was entered (since we can't really save the execution state).