疑難排解 Visual Studio Live ShareTroubleshooting Visual Studio Live Share

本文涵蓋疑難排解秘訣、因應措施,以及常見問題和問題的解答。This article covers troubleshooting tips, workarounds, and answers for common problems and questions. 您可能也會想要查看常見問題You may also want to take a look at the FAQ.

安裝/工具需求Installation / tool requirements

以下是與安裝 Visual Studio Live Share 相關的疑難排解秘訣。The following are troubleshooting tips related to installing Visual Studio Live Share.

工具Tool 問題Problem 解決方法/因應措施Resolution / Workaround
VS Code (macOS)VS Code (macOS) 此時會出現一則警告,告訴您,.NET Core 不再支援您的 macOS A warning appears telling you your macOS is not supported anymore by .NET Core 這項警告出現的原因是因為.Net Core 最近進行的更新已不再支援任何低於高階的版本(10.13 +)。This warning appears is due to a recent update made by .NET Core that no longer supports any versions lower than High Sierra (10.13+). 若要啟用 Live Share 擴充功能,請更新您的作業系統。To enable the Live Share extension, please update you OS.
VSVS 延伸模組安裝程式在嘗試安裝 Visual Studio Live Share 延伸模組時,找不到要使用的 Visual Studio 版本The extension installer cannot find a version of Visual Studio to use when trying to install the Visual Studio Live Share extension. Visual Studio Live Share 需要主機和來賓Visual Studio 2017 15.6或更高版本。Visual Studio Live Share requires Visual Studio 2017 version 15.6 or higher for both hosts and guests. 安裝Visual Studio 2017的最新穩定更新,然後再試一次。Install the latest stable update of Visual Studio 2017 and retry.
VS 程式碼VS Code 當擴充功能在第一次啟動時完成安裝時,或您收到遺失或已存在檔案的相關錯誤時,即會出現「無法安裝相依性」錯誤。A "Dependencies could not be installed" error appears the while extension is finishing installation on first start or you get errors about missing or already present files. 確認您的網路連線正常Verify you are on a good network connection. 如果您是,您可能會遇到proxy 或防火牆問題。If you are, you could be running into a proxy or firewall issue. 請參閱連線能力疑難排解See connectivity troubleshooting.

VS 程式碼VS Code 從 marketplace 安裝 Visual Studio Live Share 延伸模組時,會將它安裝在 VS Code 的穩定/insider 版本中,而不是我想要的版本。Installing the Visual Studio Live Share extension from the marketplace installs it in the stable/insiders version of VS Code instead of the version I want. 根據您的喜好啟動 VS Code 穩定或測試人員,按一下 [延伸模組] 索引標籤,搜尋 "Visual Studio Live Share",然後從該處安裝。Start VS Code stable or insiders depending on your preference, click on the "extensions" tab, search for "Visual Studio Live Share" and install from there.
VS Code (LinuxVS Code (Linux) Live Share 延伸模組不會啟動,而且在Linux上安裝擴充功能之後,不會出現狀態列專案The Live Share extension does not activate and no status bar items appear after installing the extension on Linux. Visual Studio Live Share 取決於 .NET Core 2.0,其有一些 linux 必要條件,預設不會符合特定 Linux 散發套件的需求。Visual Studio Live Share depends on .NET Core 2.0 which has a number of Linux prerequisites that may not be met on certain distributions of Linux by default. 如需有關應安裝之內容的詳細資訊,請參閱這裡。See here for details on what should be installed.

登入Sign in

以下是登入問題的疑難排解秘訣。The following are troubleshooting tips for sign in problems.

工具Tool 問題Problem 解決方法/因應措施Resolution / Workaround
VSVS 您需要使用與用來登入 Visual Studio 不同的身分識別來登入 Visual Studio Live Share。You need to sign into Visual Studio Live Share with a different identity than you use to sign into Visual Studio. 移至 工具 > 選項 > Live Share > 使用者帳戶,以選取其他帳戶。Go to Tools > Options > Live Share > User account to select an alternate account.
VS 程式碼VS Code 當瀏覽器視窗在登入期間出現,且程式在網頁上顯示為成功時,狀態列仍會顯示「在關閉瀏覽器後登入」。While a browser window pops up during sign in and the process appears to succeed on the web page, the status bar still says, "Sign in" after closing the browser. 登入之後,按一下 [有問題嗎?]After signing in, click "Having trouble?" 然後遵循指示,在工具中輸入暫時的使用者程式碼。and follow the directions to enter a temporary user code into the tool.

我們也很樂意查看可能發生的情況,因此請記錄一個錯誤We would also love to see what might be happening, so please log a bug.
全部All 您收到超時或連接錯誤You are getting a timeout or connection error. 請參閱連線能力疑難排解See connectivity troubleshooting.
全部All 使用 Microsoft 支援的公司或學校電子郵件地址登入時,您會看到一則訊息,指出「需要系統管理員核准」。When signing in using a Microsoft backed work or school email address you see a message saying, "Need admin approval". 針對存取目錄內容的新應用程式,設定您的 Azure AD 原則需要「系統管理員同意」。Your Azure AD tenet is setup to require “admin consent” for new applications accessing the contents of the directory. 如需詳細資訊,請參閱這裡See here for more details.
VS Code (macOSVS Code (macOS) 登入時,您會看到錯誤,指出SecKeychainAddGenericPassword ()失敗When signing in you see an error stating SecKeychainAddGenericPassword() failed. 這幾乎是因為 macOS 的常見問題,其中密碼變更不會反映在登入 keychain 中。This is almost always due to a common problem with macOS where password changes are not reflected in the login keychain. 請嘗試進入「Keychain 存取」,鎖定登入 Keychain,然後再次將它解除鎖定。Try going into "Keychain Access", locking the login keychain and then unlocking it again. 這可能足以解決問題,但如果您無法使用目前的密碼將其解除鎖定,請嘗試上一步。This may be enough to resolve the problem, but if you are unable to unlock it with your current password, try your previous one. 如果可行,請將登入 keychain 密碼變更為您目前的密碼。If that works, change the login keychain password to your current password. 如需詳細資料,請參閱這裡See here for details.
VS Code (LinuxVS Code (Linux) 在透過瀏覽器登入之後輸入使用者程式碼時,您會看到錯誤訊息,指出secret_password_store_sync ()失敗,錯誤碼為 XXWhen entering in the user code after signing in via the browser you see an error stating secret_password_store_sync() failed with error code XX. 這通常是因為 gnome-keyring 和/或 libsecret-1-0/ libsecret 並未安裝。This is typically due to gnome-keyring and/or libsecret-1-0/ libsecret not being installed. 您可以安裝 seahorse,然後在您的桌上型電腦環境中使用「密碼和金鑰」應用程式,來驗證 keyring 是否已正確設定。You can validate gnome-keyring is properly configured by installing seahorse and then using the "Passwords and Keys" application in your desktop environment. 在這裡閱讀更多Linux 必要條件的相關資訊。Read more about Linux prerequisites here.
VS Code (LinuxVS Code (Linux) 系統會提示您輸入具有 Live Share v 0.3.295 或以下的使用者代碼,但不會出現瀏覽器讓您取得一個。You are prompted to enter a user code with Live Share v0.3.295 or below, but no browser appears to allow you to get one. 我們正努力消除 Linux 上的使用者程式碼需求。We are working to eliminate the user code requirement on Linux. 在平均時間,應該會出現瀏覽器視窗供您用來登入。In the mean time, a browser window should appear for you to use to sign in. 如果沒有,瀏覽器視窗可能會隱藏在 VS Code 之下。If not, the browser window may be hidden under VS Code. 如果不是這種情況,請參閱下一個提示。See the next tip if this is not the case.
VS 程式碼VS Code 按一下 [登入] (或使用 [Live Share:登入] 命令)之後,就不會出現可讓您輸入認證的瀏覽器視窗After clicking "Sign in" (or using the "Live Share: Sign in" command), no browser window appears to allow you to enter your credentials. 1.在此登入1. Sign in here
2. 登入之後,按一下 [有問題嗎?]2. After signing in, click "Having trouble?"
3. 遵循指示,在工具中輸入暫時的使用者程式碼。3. Follow the directions to enter a temporary user code into the tool.
全部All 您想要加入共同作業會話,但不想要接收電子郵件更新You would like to join a collaboration session but have not / do not want to receive email updates. 登入 VS/VS Code 中的 Live Share 延伸模組並會選擇收到電子郵件更新。Signing in to the Live Share extension in VS/VS Code does not opt you into receiving email updates.

Live Share 要求來賓以安全性措施登入,讓主機能夠看到已聯結的身分識別。Live Share requires guests to sign in as a security measure so the host has visibility to the identity of those that have joined. 如果您想要允許匿名使用者加入的選項(例如不具名稱/使用者定義名稱的使用者),請向上投票此功能Up vote this feature if you'd like the option to allow anonymous users to join (e.g. users with no name / a user defined name).

共用和聯結Share and Join

以下是登入問題的疑難排解秘訣。The following are troubleshooting tips for sign in problems.

工具Tool 問題Problem 解決方法/因應措施Resolution / Workaround
全部All 共用/聯結:您收到無法連接的超時或錯誤。Share/Join: You are getting a timeout or error about not being able to connect. 請參閱連線能力疑難排解See connectivity troubleshooting.
VS 程式碼VS Code 聯結:在瀏覽器中開啟 [加入] 頁面之後,系統不會提示/無法啟動 VS CodeJoin: You were not prompted / able to launch VS Code after opening the join page in a browser. 祕訣:Tips:
  • 請確定您已啟動 VS Code 至少一次,並等候安裝完成于狀態列。Be sure you've started the VS Code at least once and waited for the install to complete in the status bar.
  • 如果沒有作用,請嘗試執行「Live Share:啟動器安裝程式」命令。If that doesn't work, try running the "Live Share: Launcher Setup" command.
  • Linux 使用者:如果在執行上述命令時提示輸入您的系統管理員(sudo)密碼,請這麼做。Linux users: If prompted to enter your admin (sudo) password when running the above command, please do so.
  • 最後,請參閱手動加入做為因應措施。Finally, see joining manually as a workaround.
如果您遇到這個問題,我們會想要查看可能發生的情況,因此請記錄一個錯誤If you hit this problem, we would love to see what might be happening, so please log a bug.
VSVS 聯結:在瀏覽器中開啟 [加入] 頁面之後,您不會收到提示/無法啟動 VSJoin: You were not prompted / able to launch VS after opening the join page in a browser. 請參閱手動加入See join manually.

我們也很樂意看到您的記錄,因此請使用 Visual Studio 的「回報問題 ...」來記錄錯誤。特徵.We would also love to see your logs, so please log a bug using Visual Studio's "Report a Problem..." feature.
全部All 聯結:您偏好將聯結連結直接貼入 Visual Studio/VS Code ,而不是按一下 web 連結。Join: You would prefer to paste the join link directly into Visual Studio / VS Code rather than clicking on the web link. 請參閱手動加入See join manually.
全部All 聯結:透過瀏覽器加入時,您會看到一則訊息,指出「工作區的擁有者似乎已離線」。Join: You see a message saying, "the owner of the workspace seems to be offline," when joining via the browser. 可能的因應措施:Possible workarounds:
  • 請嘗試手動加入Try joining manually. 我們看到跨區域(例如東部和美國西部)聯結的問題,因為不會影響手動聯結的服務問題。We have seen issues with cross-region (e.g. east and west US) joins due to service issues that do not affect manual joins.
  • 在「自動」連接模式中執行時,Live Share 可能無法直接路由至主機。Live Share may be unable to route directly to the host when running in "auto" connection mode. 嘗試轉送模式Try relay mode.
如需更多可能性,請參閱連線能力疑難排解See connectivity troubleshooting for more possibilities
VS 程式碼VS Code 聯結:您在登入之前透過瀏覽器聯結,系統不會提示您登入,而且該聯結永遠不會完成。Join: You joined via the browser before signing in, were not prompted to sign in, and the join never completed. 這是已知的 bugThis is a known bug. 按一下 [登入] 狀態列專案以登入,然後再次加入。Click the sign in status bar item to sign in and then join again.

連線能力Connectivity

如果您在登入、共用或加入時遇到連線性或超時的相關問題,下列資訊可協助您進行疑難排解。The information below can help you troubleshoot if you're having problems related to connectivity or timeouts when signing in, sharing, or joining.

如 Live Share 的連線需求一文所述,不同的連線模式有不同的需求,因此可能會發生一些不同的潛在問題。As outlined in the connectivity requirements for Live Share article, different connection modes have different requirements to function so there are a few different potential issues going on.

工具Tool 問題Problem 可能的原因Probable Cause
全部All 您正在使用proxy ,並看到許多連線問題You are using a proxy and are seeing a number of connectivity problems Proxy 設定可能很棘手。Proxy settings can be tricky. 請嘗試全域設定HTTP_PROXYHTTPS_PROXY環境變數,然後重新開機您的工具。Try setting the HTTP_PROXY and HTTPS_PROXY environment variables globally and then restarting your tool. 如需詳細資訊,請參閱proxy 設定See proxy settings for more details. 有些設定可能尚未提供支援,因此請讓我們知道這是否不適用。There are likely some configurations we do not yet support, so let us know if this does not work for you.
VS 程式碼VS Code 當您第一次安裝延伸模組並啟動 VS Code 之後,當狀態列中出現「完成安裝」時,就會收到錯誤。After installing the extension and starting up VS Code for the first time you get an an error when "Finishing Installation" appears in the status bar. 您無法存取網際網路,或存取您個人或公司防火牆封鎖的埠443上的 download.visualstudio.microsoft.com 和/或 download.microsoft.com。You cannot access the internet or access to download.visualstudio.microsoft.com and/or download.microsoft.com on port 443 is blocked by your personal or corporate firewall. 請參閱這裡,以取得為何 Live Share 需要在此時下載內容的資訊。See here for information on why Live Share needs to download something at this point.
全部All 無法登入 Visual Studio Live ShareYou are unable to sign into Visual Studio Live Share 您無法存取網際網路,或存取您個人或公司防火牆封鎖的埠80/443 上的 *. liveshare.vsengsaas.visualstudio.com。You cannot access the internet or access to *.liveshare.vsengsaas.visualstudio.com on port 80/443 is blocked by your personal or corporate firewall. 在瀏覽器中輸入 https://insiders.liveshare.vsengsaas.visualstudio.com,並確認您居住在 Visual Studio Live Share 首頁。Enter https://insiders.liveshare.vsengsaas.visualstudio.com in a browser and verify you land at the Visual Studio Live Share home page.
全部All 您處於自動模式(預設值),能夠登入,但是在共用或加入時,會看到超時或連接錯誤You are in auto mode (the default), are able to sign in, but see a timeout or connection error when either sharing or joining. 直接和轉送模式都無法連線,或有「自動」模式的 bug。Either both direct and relay modes are failing to connect or there is a bug with auto mode. 如果您可以在切換到直接或轉送模式後連接,請提出錯誤If you are able to connect after switching to direct or relay mode, please raise a bug.
全部All 您處於直接模式、能夠登入,但是在共用或加入時,會看到超時或連線錯誤You are in direct mode, are able to sign in, but see a timeout or connection error when either sharing or joining. 來賓和主機無法直接連接。The guest and host cannot directly connect. 嘗試「自動」或「轉送」模式,以查看問題是否消失。Try auto or relay mode to see if the problem goes away. 您可能需要手動允許 Live Share 透過個人防火牆,或只是使用轉送模式。You may need to manually allow Live Share through your personal firewall or simply use relay mode.
全部All 您處於轉送模式、能夠登入,但在共用或加入時,會收到超時或連接錯誤的通知。You are in relay mode, are able to sign in, but are notified of a timeout or connection error when either sharing or joining. 您的個人或公司防火牆封鎖了對埠80/443 上的 *. servicebus.windows.net 的存取。Access to *.servicebus.windows.net on port 80/443 is blocked is blocked by your personal or corporate firewall. 嘗試直接模式Try direct mode.

如需連接需求的詳細資訊,請參閱 Live Share 的連線需求一文。See the connectivity requirements for Live Share article, for more information on connectivity requirements.

另請參閱See also

快速入門Quickstarts

作法How-tos

參考Reference

仍然有問題嗎?Still having problems? 您可以提供意見反應。You can provide feedback.