I can't debug my remote server project, when I press debug button it show the waiting for connection(netbeans-xdebug) message.
Im on OS X Mavericks
This is my actual config.
in Options/PHP/Debugging on Netbeans:
Debugger port: 9000
Session ID: netbeans-xdebug
and Stop at First Line: unchecked
in my php.ini file this lines:
[Xdebug]
zend_extension=/usr/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=‘dbgp’
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_autostart = 1
xdebug.idekey = "netbeans-xdebug"
Xdebug its correctly installed.
in terminal:
php -v
PHP 5.4.24 (cli) (built: Jan 19 2014 21:32:15)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
What it's wrong? why the debug doesnt work?
Related
Debugging PHP, NetBeans not working with xdebug v3
I'm using ubuntu 18
PHP7.4
Xdebug v3.1.2
php-v
PHP 7.4.28 (cli) (built: Feb 17 2022 16:06:19) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.28, Copyright (c), by Zend Technologies
with Xdebug v3.1.2, Copyright (c) 2002-2021, by Derick Rethans
My xdebug configuation is
/etc/php/7.4/mods-available/xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.profiler_enable=1
Every time I click run in the Netebeans, I get on this message "Waiting for connection"
The default Port for xdebug V3 is 9003 and all the above the configurations are removed in xdebug v3
Replace
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug
xdebug.profiler_enable=1
With
xdebug.log="/var/log/xdebug.log"
xdebug.idekey=netbeans-xdebug
xdebug.mode=debug
outbut_buffering=Off
I set myself up a Debian server on VirtualBox, everything works great except Xdebug which won't start. On server I have Symfony 3 app which use vhost admin.localwww.pl with HTTPS.
My php -v result:
PHP 7.3.31-2+0~20211022.89+debian11~1.gbp745ac7 (cli) (built: Oct 22 2021 12:37:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.31, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.3.31-2+0~20211022.89+debian11~1.gbp745ac7, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v3.1.1, Copyright (c) 2002-2021, by Derick Rethans
My xdebug.ini
zend_extension=xdebug.so
xdebug.remote_enable = 1
xdebug.remote_host=127.0.0.1
xdebug.remote_port = 9003
xdebug.idekey = PHPSTORM
xdebug.mode=debug
xdebug.show_error_trace = 1
xdebug.remote_autostart = 1
My PhpStorm settings:
When I run PHP Remote Debug configuration I see this:
Regardless if I add ?XDEBUG_SESSION_START=PHPSTORM to the URL or if I use Xdebug Helper in Google Chrome, the effect is the same: nothing happens despite the breakpoint was set.
I use PHP CLI from remote server which is on VM:
EDIT: My current config but still doesn't work:
zend_extension=xdebug.so
xdebug.idekey=PHPSTORM
xdebug.mode=develop,debug
xdebug.start_with_request=yes
xdebug.client_host=127.0.0.1
xdebug.client_port = 9003
All your settings refer to Xdebug 2 settings, where you are using Xdebug 3.1.1 — please read the upgrade guide: https://xdebug.org/docs/upgrade_guide
Please use function xdebug_info() on any page for receiveing diagnostic data.
Also please setup xdebug_log.
Xdebug is configured to work on docker and browser.
But Xdebug not starting when the CLI PHP script is executed.
What am I missing here? How to enable debugger for client php?
docker-php-ext-xdebug.ini
zend_extension=xdebug
xdebug.mode=debug
xdebug.profiler_enable=1
xdebug.start_with_request=trigger
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=host.docker.internal
xdebug.remote_port=9003
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
xdebug.discover_client_host=1
xdebug.output_dir = "/tmp"
xdebug.idekey=PHPSTORM
PHP version info
PHP 7.4.22 (cli) (built: Jul 30 2021 01:30:52) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.22, Copyright (c), by Zend Technologies
with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans
In order to trigger Xdebug breakpoints from the terminal, I needed to export some variables before executing the script.
https://www.jetbrains.com/help/phpstorm/2021.2/zero-configuration-debugging-cli.html
This commands worked for me:
php -dxdebug.mode=debug -dxdebug.client_host=127.0.0.1 -dxdebug.client_port=9003 -dxdebug.start_with_request=yes index.php
After installing Xdebug on Windows 10 and test that with php --version command I get this output:
C:\xampp\htdocs\instacheeta>php --version
PHP 7.2.4 (cli) (built: Mar 28 2018 04:46:46) ( ZTS MSVC15 (Visual C++ 2017) x86 )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.7.0alpha1, Copyright (c) 2002-2018, by Derick Rethans
After that I enable debug mode in PhpStorm by clicking on: , enabling Firefox XDebug addons: and then make break point on PhpStorm I expect that work correctly and stop on my break points.
But there are one problem, when I opening Validate debugger configuration dialog I can't validate debugger configuration
UPDTAE:
My web app work on 8000 port with http://127.0.0.1 IP and my web app folder is in C:\xampp\htdocs\instacheeta path
PROBLEM RESOLVE
i cahnged xdebug setting into php.ini to:
zend_extension=xdebug
[XDebug]
xdebug.remote_autostart=1
xdebug.default_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_enable =1
xdebug.remote_port=9000
xdebug.idekey=PHPSTORM
and adding PHPSTORM IDE key on PHPStorm settings from settings->PHP->Debug->DBGP
Here is my setup :
Vagrant scotchbox on which i installed sudo apt-get install php5-xdebug
Host = Windows 8.1, Virtualbox = Ubuntu
I have xdebug installed (proof of the php -v) :
PHP 5.5.26-1+deb.sury.org~precise+1 (cli) (built: Jun 15 2015 10:04:01)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans
Here is my x-debug.ini :
zend_extension=xdebug.so
xdebug.remote_connect_back = 1
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_port = 9000
xdebug.idekey = "phpstorm"`
Now here is my server on phpstorm : path are fine
My procedure
First i'm trying via web browser lauching a simple symfony web application via Phpstorm.
i click on the icon that listen to debug connection
i launch debug on my php dev.portfolio.jules
its starts a debugging session with the following error : Waiting for incoming connection with ide key 'phpstorm'
The problem is that it doesn't even open a chrome tab or something..
What am i missing ?
Thank you in advance.