View Issue Details

IDProjectCategoryView StatusLast Update
0002190XdebugUncategorizedpublic2023-07-31 23:41
Reporterjohncst Assigned Toderick  
PriorityimmediateSeveritymajorReproducibilityalways
Status resolvedResolutionno change required 
PlatformPHP 8.1.2OSWindows 10 ProOS Version22H2
Product Version3.2.2 
Summary0002190: 1.33.0 auto installs, fails to connect thereafter
Description

Last night launching VSCODE auto installed XDEBUG 1.33.0. From that point on, it is impossible to connect with the server. Pressing F5 to start a debug session shows it trying to connect, but fails. Backing down to 1.32.1 fails to resolve the issue. Uninstall / reinstall fails to revolve the issue. Restarting the server fails to resolve the issue.

Steps To Reproduce

Start VSCODE, load any PHP file, press F5.

Additional Information
"version": "0.2.0",
"configurations": [
    {
        "name": "Listen for Xdebug",
        "type": "php",
        "request": "launch",
        "port": 9003
    },

[XDebug]
zend_extension = xdebug
xdebug.mode = debug
xdebug.start_with_request = yes
zend_extension = C:\Program Files (x86)\iis express\PHP\v8.1\ext\php_xdebug.dll

TagsNo tags attached.
Operating SystemWindows 10 Pro 22H2
PHP Version8.1.0-8.1.4

Activities

Zobo

2023-07-28 19:25

reporter   ~0006609

Can you open the issue here https://github.com/xdebug/vscode-php-debug/issues and provide the logs by setting "log:true" in the lauch.json.
I released a build however it still works for me.

johncst

2023-07-28 20:54

reporter   ~0006610

Couldn't find the issue on Github, so I hope posting files here is OK. I don't see a log file being created. I've included the launch.json and a video showing what happens when I press F5. The XDEBUG section of php.ini is:
[XDebug]
zend_extension = xdebug
xdebug.mode = debug
xdebug.start_with_request = yes
zend_extension = C:\Program Files (x86)\iis express\PHP\v8.1\ext\php_xdebug.dll
xdebug.remote_log = C:\Users\JohnC3\Documents\JC3\My Documents\CautioTest\newhome\xdebug.log

I know it's a bit vague with no log file. If it would be in a different location, please let me know where to look and I'll get it right over to you.

launch.json (1,577 bytes)   
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Listen for Xdebug",
            "type": "php",
            "request": "launch",
            "port": 9003,
            "log":true
        },
        {
            "name": "Launch currently open script",
            "type": "php",
            "request": "launch",
            "program": "${file}",
            "cwd": "${fileDirname}",
            "port": 0,
            "runtimeArgs": [
                "-dxdebug.start_with_request=yes"
            ],
            "env": {
                "XDEBUG_MODE": "debug,develop",
                "XDEBUG_CONFIG": "client_port=${port}"
            }
        },
        {
            "name": "Launch Built-in web server",
            "type": "php",
            "request": "launch",
            "runtimeArgs": [
                "-dxdebug.mode=debug",
                "-dxdebug.start_with_request=yes",
                "-S",
                "localhost:0"
            ],
            "program": "",
            "cwd": "${workspaceRoot}",
            "port": 9003,
            "serverReadyAction": {
                "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
                "uriFormat": "http://localhost:%s",
                "action": "openExternally"
            }
        }
    ]
}
launch.json (1,577 bytes)   

Zobo

2023-07-28 21:56

reporter   ~0006611

You've correctly set log true. The log will be in vscode panel, tab "Debug Console". You can toggle panel visibility with ctrl+J

johncst

2023-07-29 00:06

reporter   ~0006612

Again, no output produced. I've attached another video showing the debug window. When I press F5, all I see is the small green line running from left to right, but no output...

Zobo

2023-07-29 06:44

reporter   ~0006613

Strange, this could be an install error. I had a few similar issues, where the extension installation process just broke some files. One example: https://github.com/xdebug/vscode-php-debug/issues/659#issuecomment-925557874

You can try to uninstall the extension and install it again from within VSCode. If it does not work, try to uninstall it and install it from a download https://marketplace.visualstudio.com/items?itemName=xdebug.php-debug (search for "Download Extension").

Maybe there is a broken local cache. Try to check your local extension folder. I have mine in c:\users\XXX.vscode\extensions\xdebug.php-debug-1.33.0 . Uninstall the extension from vscode, close vscode and then check that the extension is really removed from the extensions folder. Then install it again.

Hope you can get it working.

If none of that works, can you ZIP up that code in c:\users\XXX.vscode\extensions\xdebug.php-debug-1.33.0 and send it here. I'd really like to catch those errors and report them to Microsoft.

johncst

2023-07-31 17:36

reporter   ~0006615

I uninstalled VSCODE, and found it left many registry entries present (in violation of their own rules). I removed those, removed the XDEBUG section from php.ini, and rebooted. I installed VSCODE, added back the zend_extension = xdebug line into php.ini, and installed XDEBUG in VSCODE. It now works. The only thing I can think of is that the uninstall of XDEBUG from VSCODE removed the zend_extension = xdebug line from php.ini, and it never got added back in. In any case, it's working now. Thank you for your help.

Issue History

Date Modified Username Field Change
2023-07-28 13:32 johncst New Issue
2023-07-28 19:25 Zobo Note Added: 0006609
2023-07-28 20:54 johncst Note Added: 0006610
2023-07-28 20:54 johncst File Added: Capture 02.wmv
2023-07-28 20:54 johncst File Added: launch.json
2023-07-28 21:56 Zobo Note Added: 0006611
2023-07-29 00:06 johncst Note Added: 0006612
2023-07-29 00:06 johncst File Added: Capture 02-2.wmv
2023-07-29 06:44 Zobo Note Added: 0006613
2023-07-31 17:36 johncst Note Added: 0006615
2023-07-31 23:41 derick Assigned To => derick
2023-07-31 23:41 derick Status new => resolved
2023-07-31 23:41 derick Resolution open => no change required