Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I am developing an extension for Visual Studio Code. I need to open a terminal window and run some command there (One after another finishes). Same as Terminal.sendText but not in integrated terminal. Is there a way to do that?

Update

The closest I've got is using:

const childProcess = spawn('node', ['--version'],{
    shell: true,
    detached: true,
    windowsHide: false
});

And the problem is it closes automatically

question from:https://stackoverflow.com/questions/65907108/how-to-open-non-integrated-terminal-window-from-vscode-extension

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
311 views
Welcome To Ask or Share your Answers For Others

1 Answer

You could possibly run the machine's terminal application and specify a command to run, like with mate-terminal, -e option. You could then run bash with certain startup commands How to invoke bash, run commands inside the new shell, and then give control back to user?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...