How to kill created terminal when closing the VS Code

Viewed 34

I got a problem regarding vs-code terminal creation and dispose. Basically I was implementing VS Code extension. So in one section I have to create terminal and run some scripts. And also need to run server using terminal command. Terminal creation and server are ran without any problem. So when close the vs code and reopen, previously created terminal tab is still there(Only the tab, no server running) (look at the screen-shot). So I tried to dispose the terminal inside this method export function deactivate() {}. But it's not work. I want to kill that terminal when the time VS code close. I didn't find any method to do that. Any idea guys?

Here : Screenshot of the terminal

Ref : https://github.com/microsoft/vscode-extension-samples/blob/main/terminal-sample/src/extension.ts

0 Answers
Related