vscode-jupyter icon indicating copy to clipboard operation
vscode-jupyter copied to clipboard

Debugging: Show function return values in Run and Debug panel, Variables section

Open lukaszkadlubowski opened this issue 1 year ago • 0 comments

VSCode supports launch.json files, where I can set "showReturnValue": true to see function return values when stepping through the functions while debugging. It works fine with regular python files. It seems however that launch.json is not used when debugging Jupyter Notebooks. It would be really helpful if this feature was supported.

This is how it works for regular Python files (and seemingly does not work when debugging Jupyter notebooks):

debug-return-value
def function1(a):
    return a + 1

def function2(a):
    return a + 2

print(f"Result is: {function1(function2(function1(function2(4))))}")

lukaszkadlubowski avatar Aug 26 '24 14:08 lukaszkadlubowski