0

Here is my setup:

php.ini in xampp in found: /opt/lampp/etc/php.ini

[XDebug]
zend_extension=/usr/lib/php/20180731/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart = 1

This is what the phpinfo() looks like:

xdebug settings

I am not able to step through the code or even set a breakpoint using the recommended PHP Debug plugin.

This is the default launch.json for VSCode.

{     
      "version": "0.2.0",
      "configurations": [
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9000
        },
        {
            "name": "Launch currently open script",
            "type": "PHP",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 9000
        }
      ]
}
LazyOne
  • 158,824
  • 45
  • 388
  • 391
jessiPP
  • 436
  • 1
  • 6
  • 21
  • Hi @jessiPP, there is likely more at play here. For arguments sake, when you run `phpinfo()` does it show xdebug is even loaded? – Joshua Dec 18 '20 at 03:03
  • 1
    @jessiPP You are using Xdebug v3 while having Xdebug v2 config params. They are DIFFERENT now (just check the message on your own screenshot -- it tells the link to check right there). In any case: check the Xdebug Upgrade Guide (https://xdebug.org/docs/upgrade_guide) and adjust your config. Similar kind of tickets: https://stackoverflow.com/a/65350070/783119, https://stackoverflow.com/a/65141934/783119 – LazyOne Dec 18 '20 at 09:41

1 Answers1

0

I saw in your phpInfo() ss that the port for xdebug is set to 9003 while your launch.json is listening to port 9000. Maybe this is the problem?