Internet is a great resource for information, you will be able to find tons of articles online that will guide you to setup visual studio code. If you find any of them useful enough, you can skip reading this post. Otherwise, you can keep going on.
Visual Studio Code provides easier way to install plugins, so you don't have to waste your time configuring it for this purpose. You need to open extensions option after opening visual studio code which can be seen in the screen shot below.
In the search bar, type "PHP IntelliSense". Click on install button. After it finishes installation. You need to configure this plugin, so that it will be able to communicate directly with the PHP executable file. If this communication is done in a right way, then this plugin will function correctly.
Configuring PHP IntelliSense
In visual studio code, in the menu bar, go to File->Preferences->Settings. In the Settings search bar, type "PHP", you can see similar result as shown below.Select PHP IntelliSense option, then click on Edit in Settings.json. You need to add following settings (that are marked inside red rectangle) in that file.
In the screen shot above, the third option (i.e, php.executablePath ) refers to the location where you have installed php. This may vary for different operating systems. The example shown here is meant for Windows operating system.
That's it, you have successfully configured PHP IntelliSense to speed up PHP development.
No comments:
Post a Comment