Why does the code . shortcut not work on OSX?

▼魔方 西西 提交于 2019-12-10 18:03:24

问题


I've tried adding the 'code .' shortcut to launch your current directory in Terminal in Visual Studio Code, but I was promptly returned the following error:

LSGetApplicationForInfo() failed with error -10814 while trying to 
determine the application with bundle identifier com.microsoft.VSCode.

Visual Studio Code is installed on my machine successfully.

I'm using OSX Yosemite 10.10.3.

Does anybody know how to get this shortcut to work correctly?


回答1:


Make sure you have Visual Studio Code 0.3.0 installed. We recently changed the bundle identifier!




回答2:


This error is because Finder cannot locate Visual Studio Code. I can reproduce the same error on my machine by deleting Visual Studio Code.

Try re-installing VS Code to /Applications and restarting Terminal.




回答3:


Press command + shift + p

Type: Install 'code' command in path

Choose the option



来源:https://stackoverflow.com/questions/30653095/why-does-the-code-shortcut-not-work-on-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!