Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

linux - Starting VSCode and running command in integrated terminal from command line?

The title summarize my question, but the long version would be that I am trying write a shell script that opens Visual Studio code in certain location and run a command inside VSCodes integrated terminal that I just had opened. The shell script should look like the following:

#!/bin/bash
# Navigate to project.
cd /path/to/my/project/directory
# Start VSCode and start running react application inside integrated terminal.
code . [+ npm/yarn start]

I know that I can open another linux terminal instance and start react application there, but I would love to start it inside integrated VSCode terminal because it is easier to debug if something goes wrong with ctrl + press on file that integrated terminal thrown an error to, etc.

Is there any solution to this issue?

Thanks in advance for help!


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

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share

2.1m questions

2.1m answers

63 comments

56.5k users

...