Visual Studio Code version 1.19.3
Recently I change my developing tool from NetBeans to VScode(Visual Studio Code). The main reason is, VScode is faster. Plus I can integrate the XDebug extension to VScode easily.
set XDebug in VScode
- Create a test.php in your webroot and add phpinfo(); command into the test.php
- Go to your browser (Chrome, Firefox, IE, Safari, etc) then type http://localhost/test.php.
- After that, copies all text on a screen and pastes into xdebug wizard website.
- Next, just follow the xdebug wizard instruction that you see on the xdebug wizard website.
- Install PHP Debug extension by Felix Becker then reload VScode
- Next, at VScode, open your project
- Then go to the debugger icon(bug icon on the left side) and hit the little gear icon.
- Choose PHP for debug
- A new launch configuration will be created with listen for xdebug and launch currently open script.
- Now you are able to use Xdebug with PHP project.