» » » VScode and XDebug

VScode and XDebug

posted in: Debug, VSCode | 0
Follow by Email
Facebook
1 min read

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. Here I will share with you how easy to set XDebug in VScode.

 

  1. Create a test.php in your web root and add phpinfo(); to the test.php
  2. Go to your browser (Chrome, Firefox, IE, Safari, etc) then visits http://localhost/test.php. After that, copies all text on a screen and pastes into xdebug wizard. After that, just follow the xdebug wizard instruction.
  3. Install PHP Debug extension by Felix Becker then reload VScode
  4. Next, at VScode, in your project, go to the debugger icon(bug icon on the left side) and hit the little gear icon. Then choose PHP. A new launch configuration will be created with listen for xdebug and launch currently open script.
  5. Now you are able to use Xdebug with PHP project.

 

Useful links

Follow by Email
Facebook