microsoft / vscode-data-wrangler

Other
440 stars 20 forks source link

DW (often) fails to open DataFrame from other frames on the call stack #279

Closed danhje closed 2 months ago

danhje commented 2 months ago

Environment data

Expected behaviour

DataFrame opens in DW.

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.

This could be a VS Code issue and not a DW issues, but since outer_var clearly is available (you can inspect it and modify it in the debug console) my first guess would be DW.

pwang347 commented 2 months ago

Hi @danhje, thanks for the issue report!

I can confirm that it reproduces for me as well. However, it looks like the DW command is never invoked in this case, so it seems like there's an issue somewhere in the variable data delegation. Could you please open an issue for this here? https://github.com/microsoft/vscode-jupyter/issues

pwang347 commented 2 months ago

Will close this for now, but we can reopen it if it turns out there's something we can do on our side as well!