Open hariprasath-yadav opened 6 years ago
This extension is not a debugger.
Do you have the directory PHP is installed in added to your PATH
? Can you post a screenshot of your PATH settings from control panel?
Yes i have added php path by using php -v i can get the php version at any location in my pc and this is my path
C:\Program Files (x86)\Ampps\php-7.1
Well there must be a reason why it cannot spawn it: https://github.com/felixfbecker/vscode-php-intellisense/blob/0f9fecdf9832a8f6d88baf887d0c4e89d68bb379/src/extension.ts#L31
Do you have php.executablePath
set in your settings?
Yes i have changed it the setting is
"php.validate.executablePath": "C:/Program Files (x86)/Ampps/php-7.1/php.exe",
Thats php.validate.executablePath, not php.executablePath.
There is only four type of setting shown in vs code for the extension and they are
and the default value for the properties are
and i have only made the change in 3rd property as
C:/Program Files (x86)/Ampps/php-7.1/php.exe
I tried both:
"php.executablePath": "C:\Program Files(x86)\Ampps\php-7.1\php.exe", "php.validate.executablePath": "C:\Program Files(x86)\Ampps\php-7.1\php.exe"
Not working. Path is correct and into Windows system path.
Thats php.validate.executablePath, not php.executablePath.
@hariprasath-yadav Follow this, it's no shown on the settings but it's the Intelisense configuration.
@hariprasath-yadav @alessandronunes same PHP version? NTS or maybe TS version of PHP?
My php version in NTS Only
I tried both:
"php.executablePath": "C:\Program Files(x86)\Ampps\php-7.1\php.exe", "php.validate.executablePath": "C:\Program Files(x86)\Ampps\php-7.1\php.exe"
Not working. Path is correct and into Windows system path.
@alessandronunes Hello, I was having the exact same issue as you until I noticed that the path from the Windows system has the '\' symbol but I should I be using the '/' symbol. Once I changed the symbol to the '/' symbol, it worked!
From Windows, this path did not work: C:\tools\php73\php.exe
What I put in the settings.json file, which worked: "php.validate.enable": true, "php.validate.executablePath": "c:/tools/php73/php.exe", "php.validate.run": "onType", (Default here is "onSave" but I changed it)
I hope this helps.
I got this error and tried to do "php.exe --version" from the Windows cmd, it immediately showed a popup that I needed to install the Visual C++ Redistributable for Visual Studio 2015-2019. Once I did that the error didn't show up anymore.
/facepalm
For me, it resolved by reversing the path of the PHP executable in vscode where it was C:\User\Path of PHP to C://User//Path until CS-FIXER is working fine heheh
Error spawning PHP: Command failed: php --version
Above error shown in vscode as notifcation when i open Launch.json file is not creating automatically when i press F5 So i creating the file and code in it manually After created the launch.json, Debug is working properly I think because of the above error only the file is not creating and i can get the php version by using the command php -v
OS: Windows 10 VS Code Version: 1.28.0 Architecture: x64 PHP Version: PHP 7.1.8 XDebug Version: 2.5.5