Environment data
- VS Code version: 1.112.0
- Jupyter Extension version (available under the Extensions sidebar): 2025.9.1
- Python Extension version (available under the Extensions sidebar): 2026.4.0
- OS (Windows | Mac | Linux distro) and version: Windows (WSL2, Linux 5.15.167.4-microsoft-standard-WSL2)
- Python and/or Anaconda version: Python 3.12.3
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
- Jupyter server running: Local
Expected behaviour
When a Jupyter notebook tab is moved to a new VS Code window, output that was previously displayed inside an ipywidgets.Output widget should appear exactly once in the new window.
Actual behaviour
After moving a notebook tab to a new VS Code window, new output generated inside an ipywidgets.Output widget (by interacting with the widget) is duplicated. This affects stream output (print()) and display output (IPython.display.display()). Output that existed before the move is not affected. out.outputs is () (empty) despite the widget displaying content, and the Jupyter output panel logs a CDN fetch error (see Logs).
Steps to reproduce:
- Open a Jupyter notebook in VS Code.
- Run the following cell:
import ipywidgets as widgets
from IPython.display import clear_output
out = widgets.Output()
button = widgets.Button(description="Click me")
def on_click(b):
with out:
clear_output(wait=True)
print("hello")
button.on_click(on_click)
display(widgets.VBox([button, out]))
- Click the "Click me" button. The word
hello appears once inside the widget.
- Drag the notebook tab into a new VS Code window.
- Click the "Click me" button again. The word
hello now appears multiple times inside the widget.
Logs
Output for Jupyter in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Jupyter)
17:17:02.750 [error] Widget Error: Failed to access CDN https://unpkg.com/ after 0 attempt(s), TypeError: Failed to fetch
Environment data
Expected behaviour
When a Jupyter notebook tab is moved to a new VS Code window, output that was previously displayed inside an
ipywidgets.Outputwidget should appear exactly once in the new window.Actual behaviour
After moving a notebook tab to a new VS Code window, new output generated inside an
ipywidgets.Outputwidget (by interacting with the widget) is duplicated. This affects stream output (print()) and display output (IPython.display.display()). Output that existed before the move is not affected.out.outputsis()(empty) despite the widget displaying content, and the Jupyter output panel logs a CDN fetch error (see Logs).Steps to reproduce:
helloappears once inside the widget.hellonow appears multiple times inside the widget.Logs
Output for
Jupyterin theOutputpanel (View→Output, change the drop-down the upper-right of theOutputpanel toJupyter)