# Can't get it to work

**URL:** <https://community.localwp.com/t/cant-get-it-to-work/23667>\
**Category:** Xdebug + VS Code\
**Tags:** installation, mac\
**Created:** [December 31, 2020, 10:28am UTC](https://community.localwp.com/t/cant-get-it-to-work/23667 "2020-12-31T10:28:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haffy](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@haffy](https://community.localwp.com/u/haffy)\
**Post date:** [December 31, 2020, 10:28am UTC](https://community.localwp.com/t/cant-get-it-to-work/23667/1 "2020-12-31T10:28:38Z")

</div>

Hi,

I have now spend an hour fiddeling with installing X Debug without Homebrew and stumbled upon this Xdebug + VS Code in Local. Great I thought ! And removed all other things that I had done and installed it.  
But I can’t get it to work. This is driving me crazy 🙂

I have tried to open VS Code from many different roots now, but the launch.json that opens when I try to run debug always miss the important thing from the “ADD RUN CONFIGURATION TO VS CODE”, but when I cd and nano in to the .vscode folder in the root I get the right stuff. So some connection is wrong.

Do I need to install XDebug in VS Code or PHP Debug or something?

---

<div class="post-metadata">

**Author:** ![haffy](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@haffy](https://community.localwp.com/u/haffy)\
**Post date:** [January 4, 2021, 7:49pm UTC](https://community.localwp.com/t/cant-get-it-to-work/23667/2 "2021-01-04T19:49:36Z")

</div>

![Skärmavbild 2021-01-04 kl. 20.43.25](https://us1.discourse-cdn.com/flex019/uploads/lwpforums/original/2X/5/5caa880c582d50235ae8e4efe329adf2eaa25ef8.jpeg)

Local makes this .vscode folder and when I run debug in VS Code I get this folder 2. And if I move the code from 1 to 2 and then install PHP Debug extension and then run I get:

“Listen for Xdebug (local) (sitename)”

Is that what I am supposed to get?

---

<div class="post-metadata">

**Author:** ![haffy](https://avatars.discourse-cdn.com/v4/letter/h/51bf81/32.png) [@haffy](https://community.localwp.com/u/haffy)\
**Post date:** [January 4, 2021, 8:06pm UTC](https://community.localwp.com/t/cant-get-it-to-work/23667/3 "2021-01-04T20:06:31Z")

</div>

Ooo the answer was here by Clay.

> **[How to get Xdebug working with Visual Studio Code?](https://community.localwp.com/t/how-to-get-xdebug-working-with-visual-studio-code/3493/21)**
>
> Awesome. Glad you got it working.

The debugger in Chrome solved it for me.

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/community.localwp.com/system/32/1_2.png) [@system](https://community.localwp.com/u/system)\
**Post date:** [September 30, 2021, 5:28pm UTC](https://community.localwp.com/t/cant-get-it-to-work/23667/4 "2021-09-30T17:28:51Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
