hoangKnLai / vscode-ipython

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

f5 & f9 sometimes malfunction #24

Closed benjamin85 closed 1 year ago

benjamin85 commented 1 year ago

hi, my os is win10 and version of vscode is 1.80. when i press f5 or f9 to run codes in text editor, codes could be sent to the terminal properly and sometimes executed. however, sometimes codes are just pasted to the terminal and i need to press Enter to execute them. i have no idea what triggers the malfunction. what should i do to fix the problem? lots of thx!

hoangKnLai commented 1 year ago

Hi, the code failed to execute sometime due to the race condition between sending text to the terminal vs. sending the newline character to execute the code.

Currently there are two ways the extension is mitigating this:

A more permanent solution is for VSCode to formally support IPython where there is an npm API for IPython or VSCode extension has a python API. Both are well beyond this extension scope. I'll keep an eye for potential solution so the options above are currently the best I got.

hoangKnLai commented 1 year ago

Hi, I believe this issue is resolved. Please reopen issue with a way to reproduce otherwise.