擴充功能和生態系統支援Extensions and Ecosystem Support
其中一個主要目標的 Visual Studio Live Share 可讓開發人員彼此共同作業的最愛,並高度自訂化工具。One of the primary goals of Visual Studio Live Share is to enable developers to collaborate with each other, from the comfort of their favorite, and highly-customized tools. 如此一來,臨機操作互動就會經常發生,同時保有以視覺化方式熟悉且工學,無論什麼您就可協助使用。This way, ad-hoc interactions can occur frequently, while remaining visually familiar and ergonomic, regardless what you're helping with. 若要這麼做,請務必在共同作業工作階段中的參與者都能夠繼續使用支援的任何延伸模組及其個人喜好設定和工作流程(例如/圖示的色彩佈景主題、 按鍵繫結關係、 編輯器產能增強工具)。To achieve this, it's critical that participants within a collaboration session are able to continue using any extensions which support their personal preferences and workflows (e.g. color/icons themes, key bindings, editor productivity enhancers).
此外,要加入為共同作業工作階段的動作立即越好,同時保有高生產力的 Visual Studio Live Share 目標是啟用自動運用具有共用其主應用程式的專案特定工具的來賓。Additionally, to make the act of joining a collaboration session as instant as possible, while remaining highly-productive, the goal of Visual Studio Live Share is to enable guests to automatically leverage the project-specific tooling their host has shared. 如此一來,您可以直接按一下連結,啟動您選擇的工具並開始進行共同作業,而不需要任何額外的設定。This way, you can simply click a link, launch your tool of choice, and begin collaborating, without any extra setup. 為了達到此目的,該延伸模組的電源核心編輯、 建置和偵錯工作流程、 無障礙地 「 遠端 」 從主機到客體,以便一些事,像是自動完成,請移至定義,以及偵錯 」只要工作 」。To achieve this, it is critical that extensions, which power the core edit, build and debug workflow, are transparently "remoted" from the host to the guest, so that things like auto-completion, go-to-definition, and debugging "just work".
本文件涵蓋目前的已知狀態 vast 的擴充功能生態系統,以及 「 計分卡 」 的上述目標。This document covers the current known state for the vast extension ecosystem, as well as a "scorecard" for the aforementioned goals. 如果您遇到不符合此準則,並務必使用您個人的工作流程延伸模組,然後請告訴我們 !If you encounter an extension that doesn't meet this criteria, and is critical to your personal workflow, then please let us know!
使用者專屬的延伸模組User-Specific Extensions
支援使用者特定的自訂延伸模組必須主機的工作並應該工作的所有來賓。Extensions that support user-specific customizations must work for the host, and should work for all guests. 如果主控件中,擴充功能無法正常運作,就是迴歸,,可能是 bug,以在 Visual Studio Live Share (請提出問題如果您會看到一個 !)。If an extension doesn't work properly for the host, that would be a regression, and is likely a bug in Visual Studio Live Share (please file an issue if you see one!). 如果延伸模組不會如預期般的來賓,它可能需要延伸模組本身中的變更,和我們將使用以位址/改善這些案例的生態系統。If an extension doesn't behave as expected for a guest, it may require changes in the extension itself, and we'll work with the ecosystem to address/improve these scenarios.
Visual Studio CodeVisual Studio Code
1 除非使用者已熟悉的程式碼片段,它們不能期望它可供使用,因此,讓它們共用一定就毫無意義。1 Unless a user was already familiar with a snippet, they wouldn't expect it to be available, and therefore, making them shared doesn't necessarily make sense.
2 這些延伸模組類別很因此不同,它們全部,就無法假設使用。不過,理論上,也應該如此,而我們會將追蹤的索引鍵未。2 These extension categories are so diverse, that it's impossible to say they all work. However, in theory, they should, and we'll track the key ones that don't.
3 這些延伸模組類別可能會受益於共同作業體驗,並因此我們需要知道使用者意見反應 !3 These extension categories may benefit from collaborative experiences, and so we need end-user feedback to know that!
4 這些都需要已安裝執行階段工具 (例如 Node.js),並在本機執行程式碼來處理客體。4 These require the guest to have the runtime tools installed (e.g. Node.js), and work by running code locally.
5 這些運作方式是連接到伺服器的某種,以及使用它的其中一個集中式伺服器客體已共用的伺服器。5 These work by connecting to a server of some kind, and can work with either centralized servers, servers that the guest has shared.
Visual StudioVisual Studio
即將推出。Coming soon.
專案專屬的延伸模組Project-Specific Extensions
主應用程式安裝延伸模組,可支援核心編輯、 建置和偵錯的應用程式,專為語言/平台/程式庫/sdk,應該會自動提供給來賓,而不需要安裝任何項目。Host-installed extensions, which support the core editing, building and debugging of an application, and are specific to a language/platform/library/SDK, should be automatically available to guests, without requiring them to install anything. 如此一來,主機可以設定其環境,以支援提高生產力的開發專案的資料,並允許其立即加入它們,而不需要的其他先決條件的來賓。This way, hosts can setup their environment to support productive development of a project, and allow their guests to instantly join them, without additional pre-requisites. 專案專屬的延伸模組不是主觀或個人以任何方式,因為它們可以決定性地共用從主應用程式-來賓,而不會影響任何人熟悉的環境。Because project-specific extensions aren't subjective or personal in any way, they can be deterministically shared from host-to-guest, without impacting anyone's familiar environment.
此外,為了支援專案專屬的延伸模組已安裝的來賓,但主機未,他們可在理想情況下提供降級的功能尚未體驗 (例如取得單一檔案 intellisense,能夠格式化文件)。Additionally, in order to support project-specific extensions that a guest has installed, but the host doesn't, they would ideally provide a degraded, yet functional experience (e.g. getting single file intellisense, being able to format a document).
1 目前只支援C#和 JavaScript/TypeScript,即將推出更多的支援。1 Currently only C# and JavaScript/TypeScript, with more support coming soon.
2 因為來賓無法存取本機檔案,則只會支援目前現用文件。2 Would only support the current active document, since guests don't have local file access.
3 共用核心偵錯體驗,不過,不會自動轉送任何啟動的伺服器。3 The core debugging experience is shared, however, any launched servers aren't automatically forwarded.
4 來賓沒有應用程式中的本機副本,因此,執行的應用程式和任何偵錯工作階段需要主機的電腦上啟動。4 Guests don't have a local copy of the app, and therefore, the running app and any debug sessions need to start on the host's machine.
5 ,任何產生的終端機、 輸出窗格和錯誤已同時共用來賓需要執行測試的輸出。5 The output of a test run would require that any resulting terminals, output panes and errors were also shared with guests.
6 幾乎所有的這些會使用 Node.jsfs
模組直接建立檔案,不會運作。6 Almost all of these would use the Node.js fs
module directly to create files, which wouldn't work.
Visual StudioVisual Studio
即將推出。Coming soon.
已知問題Known Issues
目前已知的延伸模組的問題,可能使他們無法從來賓 (以及其因應措施),共同作業工作階段的內容中的工作,因此,可能會影響其工作流程如下:The following are currently known extension issues, that could prevent them from working for guests within the context of a collaboration session (along with their workarounds), and therefore, could impact their workflow:
Visual Studio CodeVisual Studio Code
問題Issue | 原因Reason | 因應措施Workaround |
---|---|---|
使用 Node.jsfs 模組來偵測/讀取檔案 (例如組態檔中),或列舉目錄 (以及不是語言服務)。Using the Node.js fs module to detect/read files (e.g. a config file), or enumerate directories (and you aren't a language service). |
來賓無法存取本機檔案。Guests don't have local file access. | 1.依正常程序會降低使用者體驗 (如果可能)。1. Gracefully degrade the user-experience (if possible). 2.使用 openTextDocument 和findFiles 工作區 Api 來讀取並列舉檔案。2. Use the openTextDocument and findFiles workspace APIs to read and enumerate files. |
使用 Node.jsfs 模組來建立或寫入檔案Using the Node.js fs module to create or write files |
同上Same as above | N/A您可以使用openTextDocument(Uri) API,以建立untitled 檔案,但您無法將它儲存至檔案系統中,在特定路徑直接。N/A You can use the openTextDocument(Uri) API to create an untitled file, but you can't save it directly to the file system, at a specific path. |
根據專案隨附的文件庫或工具Depending on a project-bundled library or tool | 同上Same as above | 1.套件組合後援的擴充功能的相依性版本1. Bundle a fallback version of the dependency with the extension 2.支援全域安裝,以解除封鎖來賓,如果他們願意明確地加以安裝。2. Support global installation to unblock guests if they choose to explicitly install it. 3.遠端狀態/動作如果可能,因為主應用程式都有正確的相依性。3. Remote the state/action if possible, since the host would have the right dependencies available. |
使用 Node.jsfs 模組來建立目錄Using the Node.js fs module to create a directory |
同上Same as above | N/AN/A |
限制功能文件使用file 配置。Restricting functionality to documents that use the file scheme. |
在客體的側邊使用檔案vsls 配置。Files on the guest's side use the vsls scheme. |
新增支援vsls 文件 (範例)Add support for vsls documents (example) |
使用Uri.file 方法和 (或) Uri.fsPath / TextDocument.fileName 序列化/剖析 Uri 的成員Using the Uri.file method and/or Uri.fsPath /TextDocument.fileName members to serialize/parse URIs |
同上Same as above | 使用Uri.parse 並Url.toString() 相反地,其中維護,並採用檔案配置 (範例)Use Uri.parse and Url.toString() instead, which maintain and respect file schemes (example) |
使用workspace.openTextDocument 方法而不是檔案路徑 Uri Using the workspace.openTextDocument method with a file path instead of a Uri |
同上Same as above | 提供Uri 執行個體,而非原始檔案路徑字串 (範例)Provide a Uri instance instead of a raw file path string (example) |
使用workspace.rootPath 偵測工作區是否存在的屬性Using the workspace.rootPath property to detect the presence of a workspace |
workspace.rootPath 屬性呼叫Uri.fsPath 第一天workspaceFolder 在workspace ,其中包含上述相同的問題The workspace.rootPath property calls Uri.fsPath on the first workspaceFolder in the workspace , which has the same issue mentioned above |
使用workspace.workspaceFolders 屬性設為相反地,偵測是否有工作區,並如有需要看看每workspaceFolder 的Uri.scheme 來判斷它是否在本機或不Use the workspace.workspaceFolders property to detect the presence of a workspace instead, and if needed, look at each workspaceFolder 's Uri.scheme to determine if it's local or not |
註冊語言服務時,未指定的文件結構描述 (透過LanguageClient ,或languages.register* 方法)Not specifying a document scheme when registering language services (either via a LanguageClient , or the languages.register* methods) |
來賓接收來自其本機的延伸模組,與主機的語言服務的結果,並因此,如果這兩個參與者都必須安裝相同語言服務延伸模組,來賓會看到的某些項目 (例如自動完成、 程式碼的重複項目動作)Guests receive the language service results from both their local extensions, and the host, and therefore, if both participants have the same language service extension installed, guests will see duplicate entries for certain things (e.g. auto-completion, code actions) | 語言服務限制為僅限file 並untitled 配置 (範例)Restrict the language services to only file and untitled schemes (example) |
未核取的文件Uri.scheme 之前填入DiagnosticCollection ,Not checking a document's Uri.scheme before populating a DiagnosticCollection for it |
同上Same as above | 只會產生Diagnostics fordocuments 其Uri.scheme === file (範例)Only generate Diagnostics for documents whose Uri.scheme === file (example) |
傳回時,不檢查工作區中配置Tasks 來自自訂 TaskProvider Not checking for workspace scheme when returning Tasks from a custom TaskProvider |
來賓顯示所有的遠端和本機工作,因此,會顯示重複的項目如果兩個參與者有相同的擴充功能安裝Guests display all remote and local tasks, and therefore, would display duplicates if both participants had the same extension installed | 只會傳回Tasks for WorkspaceFolder s 其Uri.scheme === file (範例)Only return Tasks for WorkspaceFolder s whose Uri.scheme === file (example) |
Visual StudioVisual Studio
即將推出。Coming soon.
另請參閱See also
- 語言和平台支援Language and platform support
- Live Share 的連線需求Connectivity requirements for Live Share
- Live Share 的安全性功能Security features of Live Share
- 所有主要 Bug、功能要求和限制 (英文)All major bugs, feature requests, and limitations
- 所有功能要求和限制 (英文)All feature requests and limitations
有問題嗎?Having problems? 請參閱疑難排解或提供意見反應。See troubleshooting or provide feedback.