# Xdebug + VS Code does not work with Local

**URL:** <https://community.localwp.com/t/xdebug-vs-code-does-not-work-with-local/39513>\
**Category:** Bugs\
**Created:** [October 12, 2023, 8:47pm UTC](https://community.localwp.com/t/xdebug-vs-code-does-not-work-with-local/39513 "2023-10-12T20:47:35Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Nick-B](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/nick-b/32/16140_2.png) [@Nick-B](https://community.localwp.com/u/Nick-B)\
**Post date:** [October 13, 2023, 1:03pm UTC](https://community.localwp.com/t/xdebug-vs-code-does-not-work-with-local/39513/9 "2023-10-13T13:03:12Z")

</div>

Hi @jim_hubbard

One of our Devs tested getting this working on a Windows machine with Local 7.2.1 and VSCode. They were able to get it working just by following the steps on the Xdebug Add-On page. The warning did pop up regarding not being able to validate due to an invalid PHP executable, but that’s able to be closed out and ignored.

Here are the steps taken for the initial install:

1. Install Local
2. Install the XDebug VSCode plugin
3. Create a new preferred site
4. Click the `Add Run Configuration to VS Code` button under the `Tools` tab
5. Enable XDebug on the site in question
6. Open VSCode
7. Install the PHP Debug extension
8. Add the site’s `/app/public` directory to the VSCode workspace
9. Verify the `launch.json` config exists within your site’s `.vscode` folder (from step #4)
10. Add a breakpoint (I put mine in the `wp-config.php` file where the `DB_NAME` is defined)
11. Navigate to the VSCode debug tab and start listening for XDebug using the newly created config
12. Start your site in Local and verify VSCode catches at your breakpoint

Let us know if that helps or what other questions or issues you might have here!

---

_[View the full topic](https://community.localwp.com/t/xdebug-vs-code-does-not-work-with-local/39513)._
