Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Code" command not found in VS Code on Mac

I have just begun to code so everything is new to me. I have started using VS Code with Python 3.11 and macOS Monterey 12.6. However, very soon I discovered that when I enter the "code" command at the terminal command line, it comes back "command not found."

I have to go the command palette, uninstall the code command and then reinstall it for it to work. The problem with this is that it resets everytime I close VS Code so I have to go back and repeat the whole process of unstalling and reinstalling the code command. I have read some other posts on stackoverflow that seem to address this issue but my knowledge of programming is extremely rudimentary and I was unable to understand the answers provided. Any help would be much appreciated. Thank you.

like image 365
nknight Avatar asked Jun 03 '26 06:06

nknight


1 Answers

Maybe this will work:

  1. open vscode
  2. press cmd + shift + P
  3. type shell command: install 'code' in PATH
  4. type code . in your project folder
like image 128
davenielsen Avatar answered Jun 06 '26 07:06

davenielsen