# Debugging mit VS code

**URL:** <https://forum.shopware.com/t/debugging-mit-vs-code/67640>\
**Category:** Programmierung\
**Created:** [13. Juni 2020 um 14:47 UTC](https://forum.shopware.com/t/debugging-mit-vs-code/67640 "2020-06-13T14:47:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jnuricumbo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/jnuricumbo/32/13321_2.png) [@jnuricumbo](https://forum.shopware.com/u/jnuricumbo)\
**Post date:** [13. Juni 2020 um 14:47 UTC](https://forum.shopware.com/t/debugging-mit-vs-code/67640/1 "2020-06-13T14:47:18Z")

</div>

allo zusammen,

jemand weiss wie kann ich ein brakepoint setzten in VSCode? Ich versuche mal&nbsp;den PHP code debuggen. Ich nuzte das development template.

vielen Dank

Jorge

---

<div class="post-metadata">

**Author:** ![oliverriske](https://avatars.discourse-cdn.com/v4/letter/o/ebca7d/32.png) [@oliverriske](https://forum.shopware.com/u/oliverriske)\
**Post date:** [13. Juni 2020 um 14:54 UTC](https://forum.shopware.com/t/debugging-mit-vs-code/67640/2 "2020-06-13T14:54:08Z")

</div>

> **[Debug PHP In VSCode With XDebug | Code Wall](https://www.codewall.co.uk/debug-php-in-vscode-with-xdebug/)**
>
> In this tutorial you will learn how to setup XDebug in tandem with VSCode. Debug your PHP code like a pro.

---

<div class="post-metadata">

**Author:** ![oliverriske](https://avatars.discourse-cdn.com/v4/letter/o/ebca7d/32.png) [@oliverriske](https://forum.shopware.com/u/oliverriske)\
**Post date:** [13. Juni 2020 um 14:56 UTC](https://forum.shopware.com/t/debugging-mit-vs-code/67640/3 "2020-06-13T14:56:09Z")

</div>

PhpStorm ist aber wesentlich besser geeignet für diesen Zweck.

---

<div class="post-metadata">

**Author:** ![jnuricumbo](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/jnuricumbo/32/13321_2.png) [@jnuricumbo](https://forum.shopware.com/u/jnuricumbo)\
**Post date:** [13. Juni 2020 um 21:50 UTC](https://forum.shopware.com/t/debugging-mit-vs-code/67640/4 "2020-06-13T21:50:49Z")

</div>

If someone is interested, here is how I get to debug the development template using&nbsp;VSCode:

1. Go inside the app container and create a info.php in the public folder

2.&nbsp; Copy the output into&nbsp;[https://xdebug.org/wizard](https://xdebug.org/wizard)

1. Follow the instruction and install xdebug.

2. Add the following at the end of&nbsp;/opt/docker/etc/php/php.ini, make sure the zend\_extension path is correct.

3. Close the container and restart it, this is important!

4. Install "Xdebug helper " chrome extension.

5. Install “PHP Debug extension by Felix Becker” VSCode extension

6. Create a launch.json, add the paths you want to debug in pathMappings, and make sure you ignore vendor/ and var/&nbsp;&nbsp;This is what works for me:

7. Set some breakpoints in your code and hit F5

8. Happy coding
