如何使终端共享在VSCode LiveShare中工作



LiveShare工作正常,但当我们想要开始共享终端(只读/读写(时,它会给出以下错误消息:

Sharing Terminal: Extension 'ms-vsliveshare.vsliveshare' CANNOT use API proposal: terminalDataWriteEvent. Its package.json#enabledApiProposals-property declares: fileSearchProvider, findTextInFiles, notebookEditor, textSearchProvider but NOT terminalDataWriteEvent. The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api ms-vsliveshare.vsliveshare

降级VSCode不是一个选项。

VSCode版本:1.64.2

LiveShare版本:1.0.5330

TL;DR:完全按照错误的说法

  1. 打开VSCode并按Ctrl+Shift+P,然后选择Preference: Configure Runtime Arguments

  2. ms-vsliveshare.vsliveshare项添加到enable-proposed-api列表中。如果不存在,则创建。

{
.
.
.
"enable-proposed-api": [
...
"ms-vsliveshare.vsliveshare"
]
}
  1. 导航到VSCode扩展目录
  • Windows%USERPROFILE%.vscodeextensions
  • macOS~/.vscode/extensions
  • Linux~/.vscode/extensions
  1. 找到liveshare的正确目录,通常是ms-vsliveshare.vsliveshare-<version>,并打开其中的package.json文件。

  2. 将以下项目添加到enabledApiProposals列表中。如果不存在,则创建。

{
.
.
.
"enabledApiProposals": [
...
"terminalDataWriteEvent",
"terminalDimensions"
]
}
  1. 退出并重新启动VSCode

相关内容

  • 没有找到相关文章

最新更新