macos - 从mac终端启动vs代码时出错
问题描述
我在 mac 上安装了 vs 代码并尝试从终端启动它,但运行以下命令时出现错误:
(base) singhalm ~ $ mkdir home
(base) singhalm ~ $ cd home
(base) singhalm home $ code .
当我运行上述命令时,我收到以下警告和错误:
Syntax Warning: May not be a PDF file (continuing anyway)
Syntax Error: Couldn't read xref table
Syntax Warning: PDF file is damaged - attempting to reconstruct xref table...
Syntax Error: Couldn't find trailer dictionary
Syntax Error: Couldn't read xref table
请注意,我已经按照说明在 VS 代码中设置“Shell 命令:在 PATH 命令中安装“代码”命令”。
我还尝试通过在终端上运行以下命令手动将 VS Code 添加到我的路径中:
cat << EOF >> ~/.bash_profile
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
EOF
如何调试问题?
解决方案
推荐阅读
- javascript - onClick 不起作用
- javascript - 如何使用 react 与 asp.net MVC 创建模块化站点/门户
- apache - 在 WAMP 中使用 LDAP 的反向代理身份验证失败
- python - Web Scraping BeautifulSoup- CoinMarketCap.com 历史数据(查找最新日期)
- css - 如何解决边缘浏览器中的表格布局固定问题?
- javascript - 如何从源数组生成随机数组而不重复索引?
- amazon-web-services - 在 AWS Lambda 包中存储机密
- ruby - ruby server.rb 在终端上不起作用
- regex - 在原子编辑器中使用正则表达式进行条件替换
- angular - 无法在角度/打字稿中为对象中的键赋值