-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native REPL wrongly caches state from previous session #24359
Comments
Interesting, I can't seem to repro this. Here is what happens for me on the latest version of vscode insider and python extension. Screen.Recording.2024-10-31.at.2.13.40.PM.mov |
No, this does not work for me. When I close the Native REPL tab and run a new command, it opens the previous REPL (in this example, Screen.Recording.2024-11-04.at.15.41.22.movWhen I run "Python: Clear Cache and Reload Window", the native REPL session is indeed closed and a new one is started. However, I don't think this is intended, as the REPL should either close when closing the tab or when selecting a dedicated "Trash" action (which does not exist, but this is how the integrated terminal works, so I think the native REPL should behave similarly). |
Hey @cbrnr Thanks for this, you are 100% correct. |
I would love for this issue to be solved. I tried looking into it but haven't yet figured it out. I don't know typescript so it is tricky for me. I feel like in here: vscode-python/src/client/repl/nativeRepl.ts Lines 70 to 80 in 42962ce
we need to run: nativeRepl = undefined; That way, in But that on its own is not sufficient. After closing the REPL, sending new code throws: There is a With a bit of guidance I could look more into this. Thanks! |
Sorry, just saw this @hutch3232 Thanks very much for looking into this! |
I'm not sure if I'm missing something, but I cannot find an option to restart the native REPL. If I just close the pane and then send another Python statement (Shift-Enter), it gets executed in the previously started native REPL (i.e., all created object in that session will still be available).
The text was updated successfully, but these errors were encountered: