Skip to content
| Marketplace
Sign in
Visual Studio Code>SCM Providers>P4VSCode - P4 for Visual Studio CodeNew to Visual Studio Code? Get it now.
P4VSCode - P4 for Visual Studio Code

P4VSCode - P4 for Visual Studio Code

Perforce Software

|
1 install
| (0) | Free
P4 Server integration with VS Code's SCM features
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

P4 for Visual Studio Code

Enterprise Version Control—Directly in VS Code


Overview

Perforce P4 for Visual Studio Code (P4 VS Code) brings the powerful, enterprise-grade version control capabilities of P4 directly into your development workflow—without ever leaving Visual Studio Code.

Built for teams working with large, complex codebases, P4 VS Code enables developers to manage source control, track changes, and collaborate efficiently from a single, familiar interface.


What You Can Do

With P4 for Visual Studio Code, you can do everything you'd use the P4 command line for—without leaving the editor, including:

  • Manage changelists from the Source Control panel. Create, rename, edit, reorder, and delete pending changelists, move files between them, and submit or revert without switching tools. A distinct icon marks changelists that contain shelved files.
  • Shelve and unshelve work in progress. Park changes on the P4 Server and pick them up later — on the same machine or a different one — straight from the changelist context menu.
  • See who changed what, line by line. Run P4 Annotate from the editor tab, the Explorer, or the command palette to view per-line author and revision information for any tracked file.
  • Browse file history and compare revisions. Open the full revision history of a file from the SCM panel, then diff your working copy against any past revision in VS Code's side-by-side diff view.
  • Reconcile offline work with the depot. One command — P4: Reconcile Workspace — finds files you edited, added, or deleted outside VS Code and opens them in P4 so nothing falls through the cracks.
  • Automate routine file operations. Optionally check files out for edit on save, mark new files for add, and mark deleted files for delete in P4 — configurable per workspace.
  • Stay connected with confidence. The P4 status bar item shows the active port, user, and client, and surfaces your Connected / Logged in / Logged out state at a glance. Click it to re-authenticate when your ticket expires.
  • Find settings in seconds. Extension settings are grouped under intuitive headings — Connection, File Automation, Changelists & Workspace, Diff & Code Review, Explorer & UI, and Performance & Debug — and a precedence notice tells you when a workspace setting is overriding a user-level value.

Requirements

Before you install and use the extension, make sure that you have:

  • Visual Studio Code 1.103 or later
  • P4 Server (p4d) 2026.1 (older releases may work but are not supported)
  • Platforms: Windows 10+, macOS 12+, Linux (Ubuntu 22.04+)

Getting Started

  1. Install from the Extensions view — search for P4 for Visual Studio Code and click Install.
  2. Open a folder that contains a P4 client workspace, or that has a P4CONFIG file at the root.
  3. Configure your P4 connection in any of the following ways:
    • Drop a P4CONFIG file at the folder root with your P4PORT, P4USER, and P4CLIENT values, or
    • Set P4PORT, P4USER, and P4CLIENT as environment variables, or
    • Open Settings (Cmd+, / Ctrl+,), search for P4, and fill in the Connection group (port, user, client) directly in the VS Code Settings UI.
  4. The extension activates automatically once it detects valid P4 connection settings. Look for the P4 item in the status bar — click it to log in if you aren't already.

No separate p4 command-line client is required — the extension bundles the native P4Node library.


Learn More

For step-by-step guides, the full configuration reference, and troubleshooting tips, see the official P4 for Visual Studio Code User's Guide.

For a list of changes in this release, see the Release Notes.


Support

For issues and feature requests, contact P4 Support.


License

The P4 VS Code extension is distributed under the Perforce Software License. Notices and license terms for the third-party software bundled with the extension are listed in the Third-Party Licenses.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft