microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.28k stars 288 forks source link

Data Wrangler (often) doesn't get called when trying to open a DataFrame from other frames on the call stack #16026

Closed danhje closed 1 week ago

danhje commented 2 weeks ago

This bug was originally reported over at the DataWrangler repo (link), but they think the issue lies with the Jupyter extension.

Environment data

Expected behaviour

DataFrame opens in data view / Data Wrangler.

Actual behaviour

Nothing happens.

Steps to reproduce:

Put a breakpoint on the first return line of the following script, and run it in VS Code debugger.

import pandas as pd

def inner():
    inner_var = pd.DataFrame()
    return

def outer():
    outer_var = pd.DataFrame()
    inner()

outer()

The (empty) DF inner_var can be opened in DW. Now find the "CALL STACK" panel and click "outer". The "VARIABLES" panel now previews outer_var. But opening it in DW often fails, though not always.