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..

Good morning, I have issues with configuring xdebug for devvm. xdebug.ini is set upon Spryker docume

UQS4LDZU7
UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

Good morning, I have issues with configuring xdebug for devvm. xdebug.ini is set upon Spryker documentation, xdebug inside devvm installed, mapping set. After starting listening get just: "Waiting for incoming connection with ide key 'PHPSTORM'" Breakpoints are completely ignored. Someone has an idea maybe? Thanks.

Comments

  • schoenfeld
    schoenfeld Solution Architect Posts: 28 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited March 2020

    Activate xdebug logs via .ini

    xdebug.remote_log=/tmp/xdebug.log
    
  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Patrick. Thank you, will try and report

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Added this line to xdebug.ini. Restarted php7.2-fpm. Relaunched xdebug session. Nothing changed.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thats how my xdebug.ini looks like: zend_extension=xdebug.so
    xdebug.idekey="PHPSTORM"
    xdebug.remote_autostart=1
    xdebug.remote_enable=1
    xdebug.remote_host=10.10.0.68
    xdebug.remote_port=9000
    xdebug.extended_info = 1
    xdebug.remote_log = /tmp/xdebug.log

    This is needed to prevent max recursion exeception when Twig templates are very complicated

    xdebug.max_nesting_level=1000

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited March 2020

    Hey Alexey. You followed this doc https://documentation.spryker.com/docs/debugging-setup right?

    Please check the number of connections in ide. If that is not a problem, try switching opcache off

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Hi Evgenia, yes, exactly

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    In PHPStorm, go to: Settings (Preferences->Languages & Frameworks)->PHP->Debug -> Under External connections increase Max. simultaneous connections to 2.

    So this is correct, right?

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Yes. Here:

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    this looks right

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    try to debug Yves, set breakpoints in public/Yves/index.php

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    Please try opcache then.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Opcache is disabled. I think I got it!

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    I just reset the IP in xdbug to 10.10.0.1 from 10.10.0.68 in the xdebug.ini. Now it seems to work.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    A bit prehistory: I had to set VM_IP in .VM to 10.10.0.68 because of reasons, initially it is 10.10.0.1. So I thought, I have to change to .68 in xdebug.ini as well.

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Which seems to be wrong, in xdebug.ini it still has to be .1, despite the fact, that the vm runs now on .68 Strange, but ok, at least it works now

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Thank you all for your help anyway πŸ™‚

  • Eugenia Poidenko
    Eugenia Poidenko Sprykee Posts: 145 πŸ§‘πŸ»β€πŸš€ - Cadet

    I’m glad it works for you πŸ‘

  • rshopin
    rshopin Senior Solution Architect Sprykee Posts: 32 πŸ§‘πŸ»β€πŸš€ - Cadet

    you can use route command to detect Gateway IP and use it in xdebug conf:

    vagrant@vm- current git:(master)  route
    Kernel IP routing table
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    default         10.0.2.2        0.0.0.0         UG    0      0        0 enp0s3
    10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s3
    10.10.0.0       0.0.0.0         255.255.255.0   U     0      0        0 enp0s8
    

    in my case it's 10.0.2.2

  • UQS4LDZU7
    UQS4LDZU7 Posts: 182 πŸ§‘πŸ»β€πŸš€ - Cadet

    Super! Thanks a lot for the hint, Roman!