Laravel Laragon xDebug Issue

  • | 297 points

    So i'm trying to configure xDebug on Visual Studio Code and Laragon and i'm really having a hard time.

    Using in visual studio code project terminal

    php --ini

    I found out that it loads a different configuration file (C:\Program Files\PHP\v7.3\php.ini) than the one Laragon provides (C:\laragon\bin\php\php-7.3), how can i fix that?

    Using php --ini, in Laragon Console displays the correct php.ini it is supposed to look at BUT in Visual Studio Code Terminal it displays another one.


            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 9003

    I used port 9003 because in xdebug info it says xdebug.client_port 9003 also the project is inside C:\xampp\htdocs if that creates any issues. I honestly don't know where the problem is that's why i'm providing this random infromation.
    Also in phpinfo(); it displays correct

        Zend Engine v3.3.25, Copyright (c) 1998-2018 Zend Technologies
          with Xdebug v3.0.2, Copyright (c) 2002-2021, by Derick Rethans

  • | 297 points

    After further investigation, i found out when i type "where php" in Laragon Cosnole it displays two paths one in Laragon and one in Program Files, how do i fix that?

Log in to reply

Looks like your connection to Laragon was lost, please wait while we try to reconnect.