[Tutorial] How to add Xdebug to Laragon


  • | 1008 points

    This tutorial is a bit overkill, but I hope everyone will understand now :D

    Current PHP 7.4.0RC6 with final XDEBUG 2.8.0 works fine (tested with TS, as I'm using Apache)


  • | 110 points

    Followed the steps but it didn't work. This is what i got
    Debug session was finished without being paused
    It may be caused by path mappings misconfiguration or not synchronized local and remote projects.
    To figure out the problem check path mappings configuration for 'irs.test' server at PHP|Servers or enable Break at first line in PHP scripts option (from Run menu).
    Do not show again.

    • PHP 7.2
    • Laravel 7+
    • XDEBUG 2.9.6.X

  • | 183 points

    I followed the instructions here, and they are quite good but you have to read all the way to the bottom.

    @P-Mo said in [Tutorial] How to add Xdebug to Laragon:

    xdebug.remote_connect_back = 1

    I still had to do this add this :arrow_up: to the php.ini and reload the web server in Laragon.


  • | 68 points

    In Xdebug 3.x some settings has changed:

    So instead of xdebug.remote_enable=1 you should use xdebug.mode=debug

    And the default port has changed to 9003 instead of 9000.

    My settings:

    xdebug.mode=debug
    xdebug.discover_client_host=1
    xdebug.client_host="127.0.0.1"
    

  • | 92 points

    With Xdebug 3 some settings are changed, this is my configuration:

    • laravel 8
    • php 7.4
    • xdebug 3
    • VsCode

    launch.json vscode:
    {
    "name": "Listen for XDebug",
    "type": "php",
    "request": "launch",
    "port": 9003,
    }

    php.ini
    zend_extension=xdebug-3.0.1-7.4-vc15-x86_64
    xdebug.mode = debug
    xdebug.start_with_request = yes


Log in to reply
 

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