The following major settings are introduced by the extension. Navigate to VSCode's Settings to see or modify them.
||"en", "de", "es", "fr", "ja", "pt", "ro", "ru", "tr", "zh".||Specifies the language code of integrated documentation. If not set, the setting defaults to system's language.|
||PHP version or a profile name defined in
||Specifies the PHP version to be used by default by debugger, code analysis, and test explorer.|
||Array od PHP extension names which will be included in the IntelliSense.
||Enables/disables code lenses in PHP files above functions, types, properties, and constants.|
||number or array of numbers||Default Xdebug port. This value is used when
||Set of profile names and corresponding PHP executable path.||Defined profile names that can be chosen in
||Full path to the
||Legacy option. Specifies the full path to the
||"auto-import", "fqn", "none", "hide"||Configures how to treat completion of names outside the current namespace. See auto-import.|
||"PHP Tools", "PSR-2"||Code formatting profile.|
||Associative map of paths and whether to exclude them from problems checking.||Specifies what problems will be hidden in specified directories. It is possible to set
||"true", "false"||Allows to disable the full workspace analysis. Recommended for larger projects.|
||Associative map of paths to be excluded from the project.||Specifies files that won't be processed by the code analysis engine (code completion, navigation, problems).|
||Enables or disables showing values relevant to the currently debugged statement.|
In case the extension is not activated, a pop-up window is shown during the extension's first startup. It gives the following options:
I have the license keylets you enter the license key section and activate the extension.
Get trialsends you an e-mail with a 30-day license key.
More informationopens this web page with purchase and license information.
Once you obtain the license key and you close the pop-up window above, you can activate your copy of the extension using the VSCode's
Command palette, command
PHP Tools: Activate License. Enter your license key and confirm with
The activation requires an Internet connection. The successful installation is confirmed with the following pop-up window:
Testing and debugging features require the PHP program to be installed and configured. It is recommended to use PHP 7.0 or newer; however, PHP 5.4 and newer are supported as well.
Running tests and built-in development server requires
php with extensions
xmlwriter. Either install
php globally, so the command
php will work across the system, or set
php.executablePath setting within VSCode's Settings pointing to PHP executable.
Debugging locally requires the Xdebug extension. See how to install and configure Xdebug depending on your operating system:
- PHP 7.0 or newer
- PHP extensions
- PHP extension
xdebugwith the following options in your
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
- Problems configuration
- Managing extensions in VS Code (visualstudio.com)
- VSCode Settings (visualstudio.com)