Home  >  Article  >  Development Tools  >  vscode configure php development environment

vscode configure php development environment

王林
王林Original
2019-11-09 14:54:1918827browse

vscode configure php development environment

1. Download and install vscode

What you downloaded is a compressed package and unzip it to a directory.

2. Install the debugging plug-in in vscode

Click on the extension in the right column, enter xdebug, and when php debug comes out, click Install.

In the menu bar: File->Preferences->Configuration, add a new line of configuration on the right:

“php.validate.executablePath”: “D:/xampp/php/php.exe”

3. Verify whether the configuration is successful

Create a new folder php, and create a new test.php file in the folder.

Note that you must open a folder to successfully set breakpoint debugging. A single file is invalid.

Set a breakpoint and start debugging. Click the gear, select php->select listen for xdebug (the configuration file content does not need to be changed)

In the cmd window, execute netstat -an to see if the machine is listening on port 9000.

Recommended tutorial: vscode tutorial

The above is the detailed content of vscode configure php development environment. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn