PhpStorm XDebug with a remote browser - php

I have debugging enabled from my localhost - RHEL. So my phpstorm installed on localhost works fine when i request a url from the same box as the apache server.
However, I would like the debugging to work from another machine (different host). Is there a setting that i am missing to enable. that.
my ini file :
zend_extension = ${extension_dir}/xdebug.so
xdebug.profiler_append = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_aggregate = 0
xdebug.profiler_enable = 0
xdebug.profiler_output_dir = /tmp
xdebug.profiler_output_name = cachegrind.out.%p
xdebug.remote_enable=On
xdebug.remote_handler=dbgp
xdebug.remote_host =localhost
xdebug.remote_port = 9000
xdebug.remote_mode = "req"
xdebug.allowed_clients = ""
xdebug.remote_connect_back=1
xdebug.idekey="mykey"

Related

NetBeans 11.3 waiting for connection to Xdebug

I am using Windows 10, NetBeans 11.3, PHP7.4.9, Apache/2.4.46 (Win64), XAMPP v3.2.4 and MySQL.
My php.ini file has the following settings:
output_buffering=off
[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.9.7-7.4-vc15-x86_64.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "c:\xampp\tmp"
xdebug.remote_enable = 1
xdebug.idekey="netbeans-xdebug"
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost:81"
xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "c:\xampp\tmp"
xdebug.remote_cookie_expire_time = 36000
NetBeans configuration:
Debugger port: 9000
Session ID: netbeans-xdebug
Stop at first line: Checked
All other options are unchecked
When I click on debugging icon (Ctrl + F5) it gets stuck on "waiting for connection (netbeans-xdebug)" while shows the page completely without stopping at the break points.
xdebug.remote_host = "localhost:81" is certainly not correct. The remote_host should have the value of the IP address or hostname where your IDE runs. This is likely just localhost.
You should also upgrade to Xdebug 3.1, which has much better logging functionality for troubleshooting connection errors through it's xdebug_info() function, and xdebug.log and xdebug.log_level settings.
Please do refer to the upgrade guide though, as some setting names have changed. You would likely only need:
zend_extension = "c:\xampp\php\ext\php_xdebug-3.1.3-7.4-vc15-x86_64.dll"
xdebug.mode=develop,debug # replacement for xdebug.remote_enable
xdebug.start_with_request=1 # replacement for xdebug.remote_autostart
xdebug.idekey="netbeans-xdebug"
xdebug.client_port = 9000 # replacement for xdebug.remote_port
# I would recommend to use the default 9003,
# but you need to update Netbeans config to
# say the same too.

XDebug only works on localhost and not remote host

I've installed xdebug on my raspberry pi with visual studio code and everything is working except that I can't use xdebug with a remote host.
In php.ini and xdebug.ini and php.ini I have xdebug.remote_connect_back = 1 however whenever I load the page from my personal computer I just get listening for xdebug in vs code.
this is my configuration in php.ini
[Xdebug]
zend_extension=/usr/lib/php/20180731/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
and this is my configuration in xdebug.ini
zend_extension=/usr/lib/php/20180731/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_handler = dbgp
xdebug.remote_connect_back = 1
xdebug.remote_log = /tmp/xdebug_remote.log
xdebug.remote_mode = req
xdebug.remote_port = 9000
It should work when I open the webpage on my computer but nothing happens. And there isn't even a log file in /tmp/.

Xdebug is not enabled in PHP Version 7.1.21, XAMPP

I have this configuration:
[XDebug]
zend_extension = "G:\xampp\php\ext\php_xdebug-2.5.5-7.1-vc14.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "G:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_log = "G:\xampp\tmp\xdebug.txt"
xdebug.remote_port = 9000
xdebug.trace_output_dir = "G:\xampp\tmp"
;36000 = 10h
xdebug.remote_cookie_expire_time = 36000
Please help. I am using Window 10.
Try using https://xdebug.org/wizard.php
I've had many difficulties in the past getting xdebug setup, but that little-known xdebug wizard has been a lifesaver for me in getting my xdebug settings right.
Xdebug and a Xdebug Manager are native with EasyPHP Deverser (www.easyphp.org). Maybe you can have a look.

xdebug with netbeans and wamp 3.0.6

have WampServer Version 3.0.6 64bit
so
Apache 2.4.23 - PHP 5.6.25 - MySQL 5.7.14
I have downloaded php_xdebug-2.2.5-5.6-vc11-x86_64.dll and modified php.ini in this way:
[XDebug]
zend_extension = "C:\wamp64\bin\php\php5.6.25\php_xdebug-2.2.5-5.6-vc11-x86_64.dll"
xdebug.remote_port=9000
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_host = 127.0.0.1
xdebug.trace_output_dir = "C:\wamp64\tmp"
xdebug.profiler_append = 0
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\wamp64\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_autostart=1
xdebug.remote_connect_back=0
xdebug.remote_log=C:\wamp64\tmp\xdebug.log
But still Netbeans 8.02 doesn't stop on breakpoints.
phpinfo prompt xdebug.remote_enable = off
Why in your opinion?
The xdebug entry in php.ini is relocated to phpForApache.ini. Open the file and make xdebug.remote_enable = on .

Not able to enable debug debugger for laravel in PhpStorm

My XAMPP installation in php.ini file
[Xdebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "C:\xampp\tmp"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.idekey=PHPStorm
I done all setting in PhpStorm. But i am not able to start debugger my link is like that
http://localhost/aniCare/admin/login?XDEBUG_SESSION_START=13773
I put breakpoint on my function login. I m getting this Error:
My xdebug information:

Categories