Skip to content

Files

Latest commit

9c1a6a5 · Dec 9, 2016

History

History
75 lines (49 loc) · 2.6 KB
·

troubleshooting.md

File metadata and controls

75 lines (49 loc) · 2.6 KB
·

Troubleshooting PowerShell Extension Issues

This document contains troubleshooting steps for commonly reported issues when using the PowerShell extension for Visual Studio Code.

Windows

1. IntelliSense is extremely slow on PowerShell 5.0

There is a known issue with PowerShell 5.0 which, for a small number of users, causes IntelliSense (code completions) to return after 5-15 seconds. The following steps might resolve the issue for you:

  1. In a PowerShell console, run the following command: Remove-Item -Force -Recurse $env:LOCALAPPDATA\Microsoft\Windows\PowerShell\CommandAnalysis
  2. Restart Visual Studio Code and try getting IntelliSense again.

This issue has been resolved in PowerShell 5.1.

macOS (OS X)

1. PowerShell IntelliSense does not work, can't debug scripts

The most common problem when the PowerShell extension doesn't work on macOS is that OpenSSL is not installed. You can check for the installation of OpenSSL by looking for the following files:

If installed using Homebrew:

/usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
/usr/local/opt/openssl/lib/libssl.1.0.0.dylib

If installed by some other means:

/usr/local/lib/libcrypto.1.0.0.dylib
/usr/local/lib/libssl.1.0.0.dylib

The extension should check for these files and direct you to this documentation if you do not have OpenSSL installed.

Installing OpenSSL via Homebrew

We highly recommend that you use Homebrew to install OpenSSL. The PowerShell distribution for macOS has built-in support for Homebrew's OpenSSL library paths. If you install with Homebrew, you will avoid security concerns around creating symbolic links in your /usr/local/lib path which are needed when using other means of installation.

First, install Homebrew and then run the following command:

brew install openssl

Restart VS Code after completing the installation and verify that the extension is working correctly.

Installing OpenSSL via MacPorts

If you prefer to use MacPorts, you can run the following command to install OpenSSL:

sudo port install openssl

You will need to take an additional step once installation completes:

sudo ln -s /opt/local/lib/libcrypto.1.0.0.dylib /usr/local/lib/libcrypto.1.0.0.dylib
sudo ln -s /opt/local/lib/libssl.1.0.0.dylib /usr/local/lib/libssl.1.0.0.dylib

Thanks to @MarlonRodriguez for the tip!

Restart VS Code after completing the installation and verify that the extension is working correctly.