For Mac
I have run below steps in my terminal and it resolve my issue. you can also Try:
- Open terminal.
sudo chown -R your_user_name /usr/local/bin
- Open visual studio code.
- use keybord
command
+shift
+p
- Type the bellow command.
install 'code'
Vs Code - For test go to terminal and run
code .