hoangKnLai / vscode-ipython

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

Suggestion: Method to kill/restart the ipython kernel #56

Closed jdegenstein closed 2 weeks ago

jdegenstein commented 4 months ago

The jupyter interactive console in VSCode has a built-in button to restart the kernel. I think it would be valuable to have the same feature in this extension. I would suggest a hotkey instead of a button though.

Thanks for the great work on this extension, it is much improved with the move to %run -i from clipboard.

hoangKnLai commented 4 months ago

Hi. Thanks for the suggestion :).

Of course, restarting the kernel can be the same as closing and creating a new terminal. However, to reset the kernel, IPython provides the %reset -f command such that the terminal doesn't need to be re-created. And to kill the kernel: with the terminal panel selected Ctrl + C interrupts the current run.

Try the %reset -f and let me know if it works for you. Thanks!