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
Related
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
I am working on a project and I want to use Xdebug. So far, so good.
But I don't get that darn thing working and it is stressing me out (and also my colleagues)
I am using Laravel Homestead/Vagrant with PhpStorm as IDE. The Homestead VM is a Ubuntu VM (18.04.1 LTS)
The steps I've taken to install Xdebug.
I've to install xdebug on my Vagrant VM, it is also loaded when you start PHP and compiled with it.
php --ini
...
/etc/php/7.2/cli/conf.d/20-sysvshm.ini,
/etc/php/7.2/cli/conf.d/20-tokenizer.ini,
/etc/php/7.2/cli/conf.d/20-wddx.ini,
> /etc/php/7.2/cli/conf.d/20-xdebug.ini, <
/etc/php/7.2/cli/conf.d/20-xmlreader.ini,
/etc/php/7.2/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.2/cli/conf.d/20-xsl.ini,
/etc/php/7.2/cli/conf.d/20-zip.ini,
/etc/php/7.2/cli/conf.d/25-memcached.ini,
...
php -v
PHP 7.2.13-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Dec 7 2018 08:07:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.13-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans
with blackfire v1.24.0~linux-x64-non_zts72, https://blackfire.io, by Blackfire
I've been to File / Settings / Languages & Frameworks / PHP
This is the settings of my CLI Interpreter
This is the settings of Debug
And this is my config file
zend_extension=/usr/lib/php/20170718/xdebug.so
xdebug.idekey="PHPSTORM"
xdebug.remote_enable=1
xdebug.default_enable=1
xdebug.remote_connect_back=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.max_nesting_level=300
xdebug.scream=0
xdebug.cli_color=1
xdebug.show_local_vars=1
How can I solve the problem that when I try to go to my website, the debugger does not work (PhpStorm is listening to incoming connections and I am using a Firefox plugin for Xdebug)
Facts about my systemUbuntu 15.10Php 5.6.11Symfony 2.7 PhpStorm 10xDebug 2.4
I really struggle getting xdebug to work under my Symfony project in PhpStorm.
I installed xdebug
configured the php.ini file in my /etc/php5/apache2/php.ini
and in the cli folder
[xdebug]
zend_extension=/usr/lib/php5/20131226/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_port = 9000
xdebug.idekey = PHPSTORM
xdebug.remote_host=127.0.0.1
But when I "Start listening for PHP Debug Connections" and set breakpoints in my application and run tests with breakpoints in it, Xdebug just doesn't break the programm.
php -v
PHP 5.6.11-1ubuntu3.1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend
Technologies
with Xdebug v2.4.0, Copyright (c) 2002-2016, by Derick Rethans
Xdebug shows up under my PhP interpreter
If you need more Information please let me know
Thanks
Well I solved it by putting the xdebug settings in /etc/php5/apache2/conf.d/20-xdebug.ini
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?