Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    ashim444
    @ashim444
    image.png
    I have been trying to set up VS studio code debug since last day but I am not able to do it. here is my step, I got php_xdebug from debug wizard. Have done every steps as mentioned. here is my php ini file and my launch json file. I have check the port 9000 and it is not not being used so vs code can use it. My VsCode version: 1.51.1, xdebug version:3.0.1-7.4, php debug version: 1.13.0. I have tried every solution in the internet but still not have solution.
    Problem is I cannot stop in break point
    ashim444
    @ashim444
    Here is the link how the debug looks like. When I try to debug it doesnot stop at any break point
    https://streamable.com/irj0kw
    Lukas
    @lerni
    may cos xdebug version 3.x uses 9003? See red marked text: https://xdebug.org/docs/upgrade_guide
    SteveM
    @sdemills
    @ashim444 comparing my php.ini to yours they are the same except in mine the zend_extension line is in the [Zend Debugger] section. I don't know whether or not that matters, but it's the only difference that I see, so I thought I'd mention it, apart from mine says zend_extension=C:\xampp\php\ext\php_xdebug-2.9.8-7.4-vc15-x86_64.dll which is an earlier version to yours.
    Stephane Soares
    @stephanesoares
    Hello everyone, when I'm debugging, it ends the process alone. It only happens since upgrading to xdebug 3. Does anyone know how to fix it?
    ashim444
    @ashim444
    yes, It can be because of updates in xdebug version 3.x as @lerni said
    image.png
    does anybody face this problem, For me, this keeps from debugging to be smooth.
    piumigomes
    @piumigomes
    After latest VS Code update I'm unable to place debug points om my php editor, anyone else facing the same problem?
    1 reply
    Lovor01
    @Lovor01
    Hello Everyone, I am constantly getting
    connection 1: read ECONNRESET. I can step debug for about minute or two until connection breaks
    It happened on xdebug 2.9.8, I switched to 3.0.1, and this issue still persists.
    Any fixes?
    @ashim444 try:
    zend_extension = php_xdebug-3.0.1-7.4-vc15-nts-x86_64.dll (or whatever version you have - without prepended path), restart server/php if needed, if you cannot set debug points, see discussion here about enabling breakpoints in all files
    omnieestrada
    @omnieestrada
    Hello i have the version 1.52.0 Visual Code and 6 day ago the ide not allow add breakpoint in line for debug php.
    1 reply
    Jingsheng Wang
    @skyred
    Not sure what has changed, but today, I cannot toggle breakpoints anymore. For the existing breakpoints that I created, double click or F9 can remove them, but I cannot add more.
    Never mind, found the issue
    Franco Bianconi
    @fbianconi
    Im unable to get php-debug in listening state. when I launch the server says It can't connect to debugging client (this is xdebug v3)
        {
            "name": "Listen for XDebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "log": true
        },
    php -d xdebug.mode=debug artisan serve 
    The vscode side doesn't print any message that I can find, looked for it in debug console, output, in terminal.. nothing, The debug controls flash for a bit and disappear and nothing else happens. Any ideas?
    Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port) :-(
    Lovor01
    @Lovor01
    @fbianconi can you check with phpinfo() that xdebug is installed and it works OK?
    Lovor01
    @Lovor01

    @fbianconi is it configured correctly in php.ini?
    In my case:
    zend_extension = php_xdebug-3.0.1-7.4-vc15-nts-x86_64.dll

    ; XDEBUG Extension
    [xdebug]
    xdebug.mode=debug
    xdebug.start_with_request=yes

    Franco Bianconi
    @fbianconi
    Xdebug extension was working just fine. I switched to a fork of this extension (tiansin/vscode-php-debug) that claimed to work with Xdebug 3 and everything just worked. Thanks.
    Jan Dittrich
    @jan-di
    Hey guys, I am struggling to filter caught exceptions so that they don't break the script. I have a simple testscript below. If I have have Everything checked, it shows one break per exception + one break for the fatal error (because there is an uncaught exception). If I only check the Error nothing is shown, even the fatal error (that is shown when Everything is checked..). Is there way to break only on uncaught exceptions, and ignore caught ones?
    grafik.png
    Abo
    @AndreaBorgia-Abo
    hello. new user here, trying to setup the extension to work on a Debian/Testing system
    what works: xdebug is now shown phpinfo
    what does not work: breakpoint, for example in a simple for loop
    for ($i = 1; $i <= 10; $i++) {
    echo $i;
    }
    when I set the breakpoint then click "run, start debugging" a new firefox instance opens as expected but I get all the numbers in one go
    what should I check in particular?
    Abo
    @AndreaBorgia-Abo
    hmm, log says cannot connect to localhost 9000 ...
    Abo
    @AndreaBorgia-Abo
    i don't understand: vscode configuration has two modes, "listen for xdebug" and "launch", but then the supported settings only mention "launch".
    ok, if I disregard that bit it seems to work.... still, it's a bit confusing.
    Abo
    @AndreaBorgia-Abo
    (this was another fine example of rubber duck debugging...)
    Abo
    @AndreaBorgia-Abo
    another source of confusion was reading this page at about the same time: https://github.com/firefox-devtools/vscode-firefox-debug
    MCrowson
    @mcrowson

    Good morning all. I'm having some trouble I was hoping you could help with.

    When I run the listen for xdebug launch configuration, the bar at the bottom never turns from blue to orange, and the listener process dies almost instantly. I've tried hunting around for logs within vscode but can't seem to find anywhere that describes why the listener process is dying. Any ides on where to look for logs?

             {
                "name": "Listen for XDebug",
                "type": "php",
                "request": "launch",
                "port": 9005,
                "log": true,
                "pathMappings": {
                    "/var/www/cloud": "${workspaceRoot}"
                }
            },
    And I am on Fedora 33
    Lovor01
    @Lovor01
    Why is port 9005, did you change it also in XDebug to be 9005?
    And you have "launch" request, which is for CLI debugging. Do you debug CLI or web page?
    MCrowson
    @mcrowson
    yes it is also 9005. It is a web page
    what should my request be?
    MCrowson
    @mcrowson
    Issue turned out to be some local config change I'd made. Factory reset of codium got it working
    lyhqxgb
    @lyhqxgb

    Hello, everyone. I'm using docker and wsl2 to run my web server. I met trouble in configuring xdebug. It seems that my php-fpm could not connect to my vscode, however, my vscode is listening port correctly. Here's my php.ini set

    [XDebug]
    xdebug.remote_enable = 1
    xdebug.remote_autostart = 1
    ;xdebug.remote_handler = "dbgp"
    ; Set to host.docker.internal on Mac and Windows, otherwise, set to host real ip
    xdebug.remote_host = host.docker.internal
    ;xdebug.remote_port = 9000
    xdebug.remote_log = /var/log/php/xdebug.log

    And here's my vscode set

    {
                "name": "Listen for XDebug",
                "type": "php",
                "request": "launch",
                "port": 9000,
                "pathMappings": {
                    "/www/tp": "/home/leo/dnmp/www/tp",
                },
                "log":true
            }

    My vscode is open wsl2 folder and I think it's running in wsl2. I guss that I send request from browser in windows, and windows received xdebug's request but it didn't trans it to wsl2. Can anybody help? Thanks very much.

    lyhqxgb
    @lyhqxgb

    Hi, everybody. I've solved my problem. I set windows to let it trans request to wsl2 and it worked! Here's my setting

    netsh interface portproxy add v4tov4 listenaddress=192.168.1.105 listenport=9001 connectaddress=172.27.144.1 connectport=9001

    Here's the solution I've found. Thanks for your attention!

    Mark Abel
    @abelmark
    I'm having an issue connecting this to a docker container... It seems to be listening correctly as when I run my code when it hits the block I put a breakpoint on i get a message "command not found" and an error
    XDebugError: command is not available
        at new Response (/Users/maabel/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/xdebugConnection.js:58:19)
        at Connection.<anonymous> (/Users/maabel/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/xdebugConnection.js:613:20)
        at Generator.next (<anonymous>)
        at fulfilled (/Users/maabel/.vscode/extensions/felixfbecker.php-debug-1.14.5/out/xdebugConnection.js:5:58)
        at processTicksAndRejections (internal/process/task_queues.js:94:5) {
      code: 5,
      name: 'XDebugError'
    }

    Has anyone encountered this?

    Launch.json

    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "docker.drupal.com",
                "type": "php",
                "request": "launch",
                "port": 9000,
                "pathMappings": {
                    "/etc/drupal/sites_d7": "${workspaceRoot}/sites_d7"
                }
            },
            {
                "name": "Launch currently open script",
                "type": "php",
                "request": "launch",
                "program": "${file}",
                "cwd": "${fileDirname}",
                "port": 9000,
            },
        ]
    }
    Mark Abel
    @abelmark
    php.ini
    ; Xdebug\n\
        zend_extension="/usr/lib64/php/modules/xdebug.so"\n\
        xdebug.remote_enable=1\n\
        xdebug.remote_autostart=1\n\
        ;xdebug.remote_connect_back=1\n\
        xdebug.remote_host=docker.for.mac.localhost\n\
        xdebug.remote_port=9000\n\
        xdebug.idekey="phpstorm"
    Philipp
    @p6gb_gitlab

    I followed the install instructions but XDebug does not show in phpinfo() output. I am running PHP 7.4.9 on a local MAMP server. Here's what I added to php.ini(the one from my MAMP installation):

    [xdebug]
    zend_extension = /Applications/MAMP/bin/php/php7.4.9/lib/php/extensions/no-debug-non-zts-20190902/xdebug.so
    xdebug.mode = debug
    xdebug.start_with_request = yes
    xdebug.client_port = 9000

    Does anyone have an idea what the problem might be?

    Philipp
    @p6gb_gitlab
    Solved. I installed XDebug using phpize from the wrong PHP version. I didn't know MAMP came with XDebug preinstalled and it only has to be activated in php.ini.