Install the P4 for Visual Studio Code extension
You can install the P4 for Visual Studio Code extension on Windows, Linux, and macOS.
-
Get the P4 VS Code extension:
-
Download the p4vscode.vsix file from the Perforce website and install it manually.
-
Install the extension from the Visual Studio Code Marketplace.
In this case, Visual Studio Code installs the extension automatically and no manual VSIX steps are required.
-
Install the extension from the command line:
code --install-extension Perforce.p4vscode
-
-
In Visual Studio Code, select Extensions
to open the Extensions view. -
Select the Views and More Actions menu (
), and then select Install from VSIX. -
Browse to the directory where you downloaded the p4vscode.vsix file.
-
Select the p4vscode.vsix file and then select Install.
-
If prompted, reload or restart Visual Studio Code.
After installation completes, the P4 for Visual Studio Code extension appears in the Installed list.
After installation
After installation, the extension checks your P4 Server authentication status and configuration. If you have a valid P4CONFIG (or equivalent Visual Studio Code settings) specifying a valid user, client, and port, and a valid P4 login ticket exists on your computer, the extension connects and authenticates automatically without prompting for a password.
P4 login tickets expire based on your server configuration. If your ticket has expired, you must log in again by following the steps in Log in to P4 Server.