擴充功能和生態系統支援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

分類Category 個範例Example(s) 客體支援?Guest-Supported? 共同作業?Collaborative?
色彩佈景主題Color Themes 一個深色 Pro輸出色彩標示器彩虹字串彩色區域縮排區塊反白顯示Todo 反白顯示括號配對色彩標示器One Dark Pro, Output Colorizer, Rainbow String, Colored Regions, Indented Block Highlighting, Todo Highlight, Bracket Pair Colorizer N/AN/A
圖示集Icon Sets vscode 圖示Visual Studio 傳統圖示vscode-icons, Visual Studio Classic Icons N/AN/A
按鍵繫結Key bindings VimIntelliJ IDEA 按鍵繫結關係Emacs 易記快速鍵Vim, IntelliJ IDEA Keybindings, Emacs Friendly Keymap N/AN/A
程式碼片段Snippets Angular v5 程式碼片段HTML 程式碼片段SVG 圖示檔案標頭Angular v5 Snippets, HTML Snippets, SVG Icons, File Header N/A 1N/A 1
組織Organization 設定同步處理專案經理Timeit檢查點TODO 剖析器我的最愛 (❌),書籤(❌)Settings Sync, Project Manager, Timeit, Checkpoints, TODO Parser, Favorites (❌), Bookmarks (❌) 22 N/A 3N/A 3
產能Productivity GitLens自動重新命名標記程式碼大綱色彩反白顯示遞增選取Bracketeer影像預覽JSON 協助程式(暫留)色彩選擇器資料指標中複製 WordCodeMetrics (CodeLens)、 Git 共同作者JavaScript Booster (CodeActions,)渦輪主控台記錄檔移至下一個/上一個成員自動捲動NPM 匯入版本(❌),匯入成本(❌)GitLens, Auto-Rename Tag, Code Outline, Color Highlight, Increment Selection, Bracketeer, Image Preview, JSON Helper (Hover), Color Picker, Copy Word in Cursor, CodeMetrics (CodeLens), Git Co-Authors, JavaScript Booster (CodeActions), Turbo Console Log, Goto Next/Previous Member, Auto-scroll, NPM Import Version (❌), Import Cost (❌) 22 33
ReplREPLs REST 用戶端程式碼執行器Quokka.jsRREST Client, Code Runner, Quokka.js, R 44 33
資源管理員Resource Managers mssqlftp 簡單Azure FunctionsDockerBrew 服務mssql, ftp-simple, Azure Functions, Docker, Brew Services 55 33

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).

分類Category 個範例Example(s) 共用嗎?Shared? 客體支援?Guest-Supported?
文法 / 語法反白顯示Grammars / Syntax highlighting 擷取殼層NginxVeturDotEnvES6 字串 HTMLTodo +彩虹 CSVFish Shell, Nginx, Vetur, DotEnv, ES6 String HTML, Todo+, Rainbow CSV
語言服務Language Services YAML路徑 IntellisenseARMYAML, Path Intellisense, ARM 11 22
JSON 結構描述JSON Schemas Azure FunctionsAzure Functions
LinterLinters ESLintMarkdownlint拼字檢查工具的程式碼PHPCSESLint, Markdownlint, Code Spell Checker, PHPCS 22
格式器Formatters 美化美化Prettier, Beautify 22
偵錯工具Debuggers PythonChrome 偵錯工具Python, Debugger for Chrome 33 44
測試執行器Test Runners Java 測試執行器Mocha 提要欄位Postman 執行器Jest 執行器海王星Java Test Runner, Mocha Sidebar, Postman Runner, Jest Runner, Neptune 55 22
自訂檔案預覽程式Custom File Previewers SVG 預覽GraphVizMarkdown 映像大小SVG Preview, GraphViz, Markdown Image Size
檔案/專案產生器File/Project Generators Azure FunctionsC/c + + 專案產生器Azure Functions, C/C++ Project Generator 66
原始檔控制提供者Source control providers SVNHgSVN, Hg

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.使用openTextDocumentfindFiles工作區 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.parseUrl.toString()相反地,其中維護,並採用檔案配置 (範例)Use Uri.parse and Url.toString() instead, which maintain and respect file schemes (example)
使用workspace.openTextDocument方法而不是檔案路徑 UriUsing 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第一天workspaceFolderworkspace,其中包含上述相同的問題The workspace.rootPath property calls Uri.fsPath on the first workspaceFolder in the workspace, which has the same issue mentioned above 使用workspace.workspaceFolders屬性設為相反地,偵測是否有工作區,並如有需要看看每workspaceFolderUri.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) 語言服務限制為僅限fileuntitled配置 (範例)Restrict the language services to only file and untitled schemes (example)
未核取的文件Uri.scheme之前填入DiagnosticCollectionNot checking a document's Uri.scheme before populating a DiagnosticCollection for it 同上Same as above 只會產生DiagnosticsfordocumentsUri.scheme === file (範例)Only generate Diagnostics for documents whose Uri.scheme === file (example)
傳回時,不檢查工作區中配置Tasks來自自訂 TaskProviderNot 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 只會傳回Tasksfor WorkspaceFolders 其Uri.scheme === file (範例)Only return Tasks for WorkspaceFolders whose Uri.scheme === file (example)

Visual StudioVisual Studio

即將推出。Coming soon.

另請參閱See also

有問題嗎?Having problems? 請參閱疑難排解提供意見反應See troubleshooting or provide feedback.