1) Download and install Visual Studio CodeYou can find the Visual Studio Code installer on the following permalink: http://code.visualstudio.com/

2) Set up PHP Debug VSCode extensionOpen the Visual Studio Code command Pallete with CTRL+SHIFT+PFind the PHP Debug extension by typing the following command

*

*

Install the first match from Felix Becker.

Đang xem: Php programming with visual studio code

3) Install a XAMPP Package

Note: If you already have a PHP Development environment you can avoid doing this step.

1) Download and install a XAMP solution https://www.apachefriends.org/index.html

2) (Optional) If you already have IIS or Skype or any Java app that uses the :80 port you might want to change the apache port, but i recommend you to change your app port (you can google how to change it for skype for example). To change the default apache port, follow this steps:

Go to the httpd.conf file for Apache

*

*

Find the Listen line and change the Listen port to your desired port. EX: Listen 80Listen 8066 (Example)

*

Save and restart the server

3) Go to the xampphtdocs folder and replace it’s contents with your php solution.

4) Open the development folder with Visual Studio Code

In Visual Studio Code, go to File->Open Folder and open xampphtdocs (Where you did put your PHP Files).

Xem thêm:

5) Install and configure XDebug

There are two ways of installing the right XDebug version for your development machine:

If you are doing PHP development the most likely is that you already know the phpinfo(); global function.If not, then create the following file on your htdocs folder:

And place it on your development folder, then open it with your browser, it should like something like this.

Then, copy and paste the page on the XDebug big wizard text field.

This should give you the binary link to install and how to install it, download it and install it.

Xem thêm:

This should also give you a line of code to put in php.ini, save it for the sixth step.

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *