vscode + phpstudy build php debugging environment

Since vs code open-source and cross-platform, and many plug-ins, we intend to use both writing and debugging php vs code.

Configuring vs code + phpstudy of php debugging environment as follows:

1, the configuration phpstudy, other options menu -> php extensions and settings -> php extensions -> check xdebug

2, and then modify php.ini, you find the corresponding versions of php.ini in the php directory, [XDebug] to modify the contents of the directory zend_extension

Xdebug modify your path of the dll, as shown below

Special attention, to add the last two words.

Modify good restart after the Apache , see xdebug there is no configuration, you can check phpstudy in the phpinfo,

If there phpinfo xdebug it shows the xdebug php configuration successful.

3, configuration vs code

vs code, there are php debug plug-in, as long as the installation is like,

You must set the path to php.exe installed after

File -> Preferences -> Settings -> Extended -> php-> validate: executable path

Add the execution path php.ext:

"php.validate.executablePath": "D:\\phpStudy\\PHPTutorial\\php\\php-5.4.45\\php.exe",
 
After setting open the folder where php file, remember to open the file folder where php, php file instead, if it is, then the php file by f5 will not appear listen for xdebug of (here I made a mistake).
Open the folder where the php file you can see by f5 listen for Xdebug, and as shown in Fig.

 

 

 

Guess you like

Origin www.cnblogs.com/luozuomail/p/11105269.html
Recommended