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:完全按照错误的说法
-
打开VSCode并按
Ctrl
+Shift
+P
,然后选择Preference: Configure Runtime Arguments
-
将
ms-vsliveshare.vsliveshare
项添加到enable-proposed-api
列表中。如果不存在,则创建。
{
.
.
.
"enable-proposed-api": [
...
"ms-vsliveshare.vsliveshare"
]
}
- 导航到VSCode扩展目录
- Windows
%USERPROFILE%.vscodeextensions
- macOS
~/.vscode/extensions
- Linux
~/.vscode/extensions
找到liveshare的正确目录,通常是
ms-vsliveshare.vsliveshare-<version>
,并打开其中的package.json
文件。将以下项目添加到
enabledApiProposals
列表中。如果不存在,则创建。
{
.
.
.
"enabledApiProposals": [
...
"terminalDataWriteEvent",
"terminalDimensions"
]
}
- 退出并重新启动VSCode