hoangKnLai / vscode-ipython

VSCode Extension integrating Editor with IPython console.
MIT License
18 stars 5 forks source link

New terminal at each execution of file or block of code #39

Closed avigan closed 11 months ago

avigan commented 11 months ago

Hello,

Since recently every time I run the commands "Run file in ipython terminal" or "Run section block of code", VSCode opens a new terminal instead of reusing the one that is already opened. Not sure if the problem is coming from the ipython extension or from VSCode itself. Any clue?

Here is my configuration:

Version: 1.82.2 (Universal)
Commit: abd2f3db4bdb28f9e95536dfa84d8479f1eb312d
Date: 2023-09-14T05:59:47.790Z
Electron: 25.8.1
ElectronBuildId: 23779380
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Darwin arm64 22.6.0
hoangKnLai commented 11 months ago

Can you check if the created terminal name is exactly IPython? Also, if possible, a screenshot would help. Thanks!

avigan commented 11 months ago

Here is screenshot:

image

It seems that the terminal is not named IPython

hoangKnLai commented 11 months ago

That's the problem. Currently, the extension do a naive terminal type tracking using name only. Since the terminal is being created via ms-python extension, then renamed asynchronously, there is a chance that it fails.

Anyhow, I have a plan to fix that next.

For now, you can manually rename the terminal. See if that solves it until a better fix is released.

avigan commented 11 months ago

It does work if I rename the terminal to IPython. What I don't understand is that it was working flawlessly until a couple of weeks ago. I guess an update broke something. Anyway, I hope you can make a fix for that. Congrats for the great work!

hoangKnLai commented 11 months ago

Thank you for the kind feedback!

Also, sorry for the inconvenient with the current terminal handling. There were some recent changes to enable some of the new features but I'll think of something along a hotfix/reverting changes if possible. My primary focus will be of a more permanent fix in #33.

hoangKnLai commented 11 months ago

@avigan, just published v2023.10.0 that should fix this problem. Let me know if this is not the case. Also, check out the new dedicated terminal with ctrl+shift+i f5 on a script.py 😃.

avigan commented 11 months ago

It works fine now. Thanks for the quick fix!!