Setup XDebug in VSCode
Home » Blog » Debug » Setup XDebug in VSCode

Setup XDebug in VSCode

Updated:   Debug, VSCode 1 min read

Your support helps keep this blog running! Secure payments via Paypal and Stripe.


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

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

Your support helps keep this blog running! Secure payments via Paypal and Stripe.


Senior WordPress Developer (Freelancer)

Senior WordPress Developer (Freelancer)

I’m a professional WordPress and WooCommerce developer based in Chiang Mai, Thailand, with over a decade of experience creating fast, secure, and scalable websites. From custom themes and plugins to full WooCommerce stores, I help businesses build a strong and reliable online presence. Need a freelance WordPress developer you can count on? View my portfolio or get in touch to discuss your project.