Closed
Description
openedon Jun 26, 2023
Refs: #172974
- macOS @ulugbekna
- linux @connor4312
- windows @minsa110
Complexity: 3
Explanation
This focuses on the behavior for saving an Interactive Window. Current behavior testing should be covered by #186191.
Prerequisites
- install the pre-release versions of jupyter and python extensions
- ensure you have a python interpreter installed
- use
Python: create environment
to create a local virtual environment in the workspace to keep any changes out of your global python environment - You'll need the python kernel packages to run the interpreter as a kernel, but vscode should guide you in installing these when attempting to run anything.
Test steps
- Create a python file and add a few code cells (
# %%
marks a cell), e.g.
# %%
# this will likely show a syntax error in the python file
%pip install matplotlib
# %%
import matplotlib.pyplot as plt
x = [1, 6, 10]
y = [5, 13, 27]
plt.plot(x, y)
plt.plot(y, y)
plt.plot(y, x)
# %%
import time
for i in range(50):
print(i)
time.sleep(.1)
# %%
def throwAnError(x):
raise Exception('This is an error message.')
throwAnError(x)
- Execute the code in an interactive window, either
Run file in interactive window
related commands or the code lenses.
a. This will open the interactive window editor to be saved - Save the Interactive Window editor. It can only be saved as .ipynb, and the editor will re-open as a notebook.
a. loading is not supported - Create another interactive window and Switch
files.hotExit
to off. Then close vscode to ensure you are prompted to save.
a. test both save and revert options.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment