首先打开vscode,然后cmd+shif+P就可以看到如下画面:
cmd+shif+P
输入shell,就可以看到提示install code command in path
shell
install code command in path
选中回车
之后就可以在终端打开项目了