sassoftware / vscode-sas-extension

This SAS Extension for Visual Studio Code provides support for the SAS language, including features such as SAS syntax highlighting, code completion, hover help, code folding, outline, SAS code snippets and run SAS code.
https://sassoftware.github.io/vscode-sas-extension/
Apache License 2.0
116 stars 47 forks source link

Refresh Kernel in SAS Session #1212

Open fabiocerutisas opened 4 days ago

fabiocerutisas commented 4 days ago

Is your feature request related to a problem? Please describe. When coding in .sasnb notebooks in SAS Viya Workbench, it can happen that a cell takes too long to execute and it can't be stopped with the interrupt button. Specifically, after pressing the interrupt button, there is a "cancelling SAS jobs" message that shows up but the cell does not stop from running. This is something that also happens in Python programming: when stopping a cell that is taking too long, often times the Interrupt button is not enough to stop the process and the .ipynb notebook forces you to refresh the kernel to resume coding.

Describe the solution you'd like It would be nice to have a Refresh Kernel button for sas notebooks similar to the one already available for .ipynb notebooks. The button should clear the session from all on-going processes and reset all the macro variables/functions that have been defined. Additionally, when trying to stop a cell from running is taking too long, a message stating to refresh the kernel should pop-up (as it is already the case for .ipynb notebooks).

Describe alternatives you've considered Currently, when a SAS cell is taking too long to execute and is not stopping after pressing the Interrupt button, I need to shut down my entire workbench instance to make sure that the SAS Code stops from running.

Additional context N/A

Environment SAS Viya Workbench

scnwwu commented 2 days ago

Does Close Session (hovering the profile at the bottom) work in this case?

fabiocerutisas commented 2 days ago

I have tried but the code still runs, it is not killed by the Close Session button. Once I click on the Close Session button I correctly see the "The SAS session has closed" banner in the bottom right part of screen yet, as seen from the picture below, even after 10+ minutes the cell is still executing image