I am contently getting this error when I start debugging with xdebug while it doesn't stop in any of my breakpoints it stop in warnings that I did not put breakpoints on and when I click on local
variables it start loading and load forever until I have to restart vscode.
running
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 is not functioning as it should on my vscode, it breaks on files that I did not put breakpoints on and when I hover over the variables doesn't show anything.
I am contently getting this error when I start debugging with xdebug while it doesn't stop in any of my breakpoints it stop in warnings that I did not put breakpoints on and when I click on local
variables it start loading and load forever until I have to restart vscode.
running
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
I have tried to configure my php.ini changing the remote settings and also in xdebug.ini but the problem still remains, also in the vscode json file I have change the port from 9000 to different port but still not results.
my 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
and my 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
and the lunch.json file
{
// 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
}
]
This is what us happening on the variables
I expect xdebug to stop on breakpoints and show the local variables so i can know where to go when I am debugging big frameworks like Laravel and magento.
Thank you.
Try replacing your Xdebug setting with the ones below in the php.ini
zend_extension="xdebug.so"
xdebug.remote_autorestart=1
xdebug.remote_autostart=1```