使用VSCode IDE的php7.0-fpm、nginx的xDebug配置未在断点处停止

使用VSCode IDE的php7.0-fpm、nginx的xDebug配置未在断点处停止,nginx,xdebug,fpm,Nginx,Xdebug,Fpm,当我开始使用xdebug进行调试时,当它没有在我的任何断点处停止时,它会在我没有设置断点的警告中停止,当我单击local变量时,它会开始加载并永远加载,直到我必须重新启动vscode 运行 Ubuntu linux 18.4 nginx php -v PHP 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:34:35) ( NTS ) Copyright (c) 1997-2017 The PHP Group

当我开始使用xdebug进行调试时,当它没有在我的任何断点处停止时,它会在我没有设置断点的警告中停止,当我单击
local
变量时,它会开始加载并永远加载,直到我必须重新启动vscode

运行

Ubuntu linux 18.4
nginx

php -v
PHP 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:34:35) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-8+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans

Ubuntu linux 18.4
nginx

php -v
PHP 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:34:35) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-8+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans

xdebug在我的vscode上没有发挥应有的作用,它在我没有设置断点的文件上会中断,当我将鼠标悬停在变量上时,不会显示任何内容

当我开始使用xdebug进行调试时,当它没有在我的任何断点处停止时,它会在我没有设置断点的警告中停止,当我单击
local
变量时,它会开始加载并永远加载,直到我必须重新启动vscode

运行

Ubuntu linux 18.4
nginx

php -v
PHP 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:34:35) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-8+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans

Ubuntu linux 18.4
nginx

php -v
PHP 7.0.33-8+ubuntu18.04.1+deb.sury.org+1 (cli) (built: May 31 2019 11:34:35) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-8+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2017, by Zend Technologies
    with Xdebug v2.7.1, Copyright (c) 2002-2019, by Derick Rethans

我试图通过更改远程设置和xdebug.ini来配置我的php.ini,但问题仍然存在,在vscode json文件中,我将端口从9000更改为其他端口,但仍然没有结果

我的php.ini

[Xdebug]
zend_extension="xdebug.so"
xdebug.remote_autorestart=1
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.remote_connect_back=1
xdebug.remote_log=/var/log/xdebug.log
还有我的xdebug.ini

zend_extension="xdebug.so"
xdebug.log

[21636] Log opened at 2019-06-12 09:39:00
[21636] I: Checking remote connect back address.
[21636] I: Checking header 'HTTP_X_FORWARDED_FOR'.
[21636] I: Checking header 'REMOTE_ADDR'.
[21636] W: Remote address not found, connecting to configured address/port: localhost:9000. :-|
[21636] W: Creating socket for 'localhost:9000', poll success, but error: Operation now in progress (29).
[21636] E: Could not connect to client. :-(
[21636] Log closed at 2019-06-12 09:39:00
和sunch.json文件

{
    // 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": [

        {
            "type": "chrome",
            "request": "launch",
            "name": "Launch Chrome",
            "webRoot": "${workspaceFolder}\\web"
        },
        {
            "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
        }
    ]

我希望xdebug在断点处停止并显示局部变量,这样我就可以知道在调试像Laravel和magento这样的大型框架时应该去哪里


谢谢。

尝试在
php.ini中用下面的设置替换Xdebug设置

zend_extension="xdebug.so"
xdebug.remote_autorestart=1
xdebug.remote_autostart=1```

那么ini xdebug.ini呢?