What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello, I can't run XDebug using Windows, Docker and PHPStorm. Things i've done: • running spryker wi

U01MJ8M8Y0G
U01MJ8M8Y0G Posts: 11 🧑🏻‍🚀 - Cadet

Hello,
I can't run XDebug using Windows, Docker and PHPStorm.
Things i've done:
• running spryker with "x" flag
• sending PHPSTORM cookie via browser (Xdebug helper extension)
• pulling docker-sdk to the current version
• setting PHPStorm like screens below
• setting breakpoint in 1st line of controller action (breaking at 1st line doesn't work either)
• opening Zed or Yves app and XDebug is doing nothing
Have you any ideas what should I check or set more?

Comments

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Hello Łukasz, in docker/context/php/debug/etc/php/debug.conf.d/69-xdebug.ini please try to change xdebug.remote_host=host.docker.internal.

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    After that docker/sdk boot deploy.dev.ym (or what deploy file you are using) and up again.

  • U01MJ8M8Y0G
    U01MJ8M8Y0G Posts: 11 🧑🏻‍🚀 - Cadet

    I've changed it and it didn't help 😞

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    How do you run docker? Wsl1\2?

  • U01MJ8M8Y0G
    U01MJ8M8Y0G Posts: 11 🧑🏻‍🚀 - Cadet

    wsl2

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Internally our developers faced IP issue:

    If everything seems to be right but debugging in phpstorm ist not working try this: 
    
    First check your machines IP addresses by opening a Power Shell console and enter “ipconfig” and check the available network adapters and their IPs.
    
    Edit docker/deployment/default/bin/environment/docker.sh and find the line local myIp='host.docker.internal change the host there to your IP address. If you have multiple network adapters you might need to try each IP until it works.
    
    Edit docker/bin/environment/docker.sh as well in the same way
    
    Run docker/sdk stop and then run docker/sdk up
    
    To be sure restart phpstorm
    
    Run docker/sdk cli -x then run inside of it console - phpstorm should now show work with the breakpoints
    
  • U01MJ8M8Y0G
    U01MJ8M8Y0G Posts: 11 🧑🏻‍🚀 - Cadet

    in docker/context/php/debug/etc/php/debug.conf.d/69-xdebug.ini
    I set xdebug.client_host=host.docker.internal
    and it started working
    thanks for your help! :)

  • Valerii Trots
    Valerii Trots SRE @ Spryker Sprykee Posts: 1,654 ✨ - Novice

    Right, it's because of xdebug v3 has different settings...

  • Christian von Schassen
    Christian von Schassen Director Partner Succcess Management Sprykee Posts: 33 🧑🏻‍🚀 - Cadet

    @U010DNAA3QW & @U01LLUGR1F0 Maybe that helps you too?

  • U018XELUZS9
    U018XELUZS9 Posts: 167 🧑🏻‍🚀 - Cadet

    We're already looking into that 👍

  • U01LLUGR1F0
    U01LLUGR1F0 Posts: 60 🧑🏻‍🚀 - Cadet
    edited February 2021

    Sorry didn't help. Also no new info here 😞.
    I already tried all this. Also tried it again. Still no luck.

  • Christian von Schassen
    Christian von Schassen Director Partner Succcess Management Sprykee Posts: 33 🧑🏻‍🚀 - Cadet

    Too bad @U01LLUGR1F0 😞 In this case I suggest to raise an official support case at support.spryker.com

  • U01LLUGR1F0
    U01LLUGR1F0 Posts: 60 🧑🏻‍🚀 - Cadet

    @UJLM6CAFR I went through all of the instructions again, after changing the config over and over again and noticed, that my config said xdebug.remote_host instead of xdebug.*client*_host.
    That finally did the trick, but I'm sure I already had it the right way, but something about windows defender a different way, why it propably didn't work.

    So it seems I finally got it to work. Thank you.

  • Christian von Schassen
    Christian von Schassen Director Partner Succcess Management Sprykee Posts: 33 🧑🏻‍🚀 - Cadet

    That's awesome, so glad to hear that @U01LLUGR1F0!