My IDE is VS Code I have been using it many times suddenly when I open vs code in my terminal
. code or source code
it displays error
-bash: //MacOS/Electron: No such file or directory
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Process completed]
How do I fix this? I just want to get my normal vs code to work functional again just as before
I visited https://vscode-docs.readthedocs.io/en/stable/editor/setup/
Afterwards, I copy and pasted the following onto a new line in my system ~/.zshrc file
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
Don't forget to source ~/.zshrc after then restart terminal
Worked great, now I can run code . again for any folder/project
For me, I didn't have a globally accessible python. Which is called in /usr/local/bin/code.
Since I'm using asdf I simply did asdf global python x.xx.x.
If you are not using asdf perhaps perform brew install python.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With