Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2285

Xdebug Remote Debugging failing to start

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.0
    • 12.6
    • php - Debugger
    • Product Version: Apache NetBeans IDE 10.0 (Build incubator-netbeans-release-380-on-20181217)
      Java: 1.8.0_201; Java HotSpot(TM) 64-Bit Server VM 25.201-b09
      Runtime: Java(TM) SE Runtime Environment 1.8.0_201-b09
      System: Windows 10

    Description

      The issue might be the same as NETBEANS-1959

      By posting this issue here I'm hoping to provide more information from a different perspective.

      Remote debugging fails to start with PHP 7.3 and Xdebug 2.7.0 (php.ini see attached php.ini-7.3.txt), but works fine with PHP 7.2 and Xdebug 2.6.1 (php.ini see attached php.ini-7.2.txt). Direct debugging on CLI scripts works fine in all cases.

      How do I mean fails to start with PHP 7.3 and Xdebug 2.7.0:

      When starting a remote debug session as normal, a browser tab is open with the usual URL:

      https://test.local/?XDEBUG_SESSION_START=netbeans-xdebug

      But the browser tab keeps waiting for the page to load until timed out. Netbeans displays "Waiting for connection..." in the status bar indefinitely until the debugging session is stopped, then an information dialog is shown about a possible misconfiguration (see attached Screenshot1.PNG). For Xdebug remote log content see attached file xdebug-remote-7.3.log, its contents are very similar to one posted in NETBEANS-1959. If debugging session is attempted after being stopped for the first time, no new browser tab is open, no new lines appear in the Xdebug remote log and the status bar says again "Waiting for connection...". The only way I've found to reset to the initial state is to restart Netbeans.

      For comparison, with PHP 7.2 and Xdebug 2.6.1, according to the Xdebug remote log (see attached xdebug-remote-7.2.log) proceeds to setting breakpoints and successfully closing the connection. Netbeans status bar says "Running".

      One notable difference in remote logs is that with Xdebug 2.7 it contains a string derived from the computer name as IDE key:

      idekey="DESKTOP-A3058Q3$"

      And with Xdebug 2.6.1 there is a configured value from Netbeans IDE options:

      idekey="netbeans-xdebug"

      I did try to copy DESKTOP-A3058Q3$ to Netbeans configuration, but a new debugging session didn't seem to go any differently.

      Of all the things I've tried to tweak in php.ini before posting this issue, apparently I haven't tried this one: manually configure xdebug.idekey and make sure it matched the one configured in Netbeans:

      xdebug.idekey=netbeans-xdebug

      Then the debugging session has finally started!

      Attachments

        1. php.ini-7.2.txt
          0.3 kB
          Czukowski
        2. php.ini-7.3.txt
          0.3 kB
          Czukowski
        3. Screenshot1.PNG
          15 kB
          Czukowski
        4. xdebug-remote-7.2.log
          4 kB
          Czukowski
        5. xdebug-remote-7.3.log
          2 kB
          Czukowski

        Issue Links

          Activity

            People

              Unassigned Unassigned
              czukowski Czukowski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: