[筆記] VS Code 修正 command not found: code 錯誤

章節連結

VS Code 用命令列開啟專案,可以用 “code” 指令。不過若出現 command not found: code 的錯誤,就透過 VS Code 設定來將其開啟即可。

vs code


內容

1. 開啟 VS Code,輸入 Cmd + Shift + P

2. 輸入 Shell Command: Install ‘code’ command in PATH ,並確定執行

notes-vs-code-fix-command-not-found-code-1

3. 新開命令列,輸入 vscode -v,會有回傳版本號,那就是 OK


參考資料

1. Fixing “command not found: code” on Mac: A Guide for Visual Studio Code Users
2. Launch VS Code from the command line

按讚加入粉絲團

延伸閱讀