Skip to content

Interactive Window session lost without warning when changing folders #151444

Closed
@greazer

Description

@greazer

From a comment from Mira on our marketplace reviews. This is my interpretation of what their feedback was.

  1. Open folder A, then launch an instance of the Interactive Window (Jupyter: Create Interactive Window)
  2. Do some work there by entering Python commands in the input box.
  3. Create and open folder B in the same instance of VS Code.
  4. 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).

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions