in src/main.ts [730:749]
function terminateScript(): void {
if (useTerminal()) {
window.showInformationMessage('Killing is only supported when the setting "runInTerminal" is "false"');
} else {
const items: ProcessItem[] = [];
runningProcesses.forEach((value) => {
items.push(new ProcessItem(value.cmd, `kill the process ${value.process.pid}`, value.process.pid));
});
window.showQuickPick(items).then((value) => {
if (value) {
outputChannel.appendLine('');
outputChannel.appendLine(`Killing process ${value.label} (pid: ${value.pid})`);
outputChannel.appendLine('');
kill(value.pid, 'SIGTERM');
}
});
}
}