Xdebug Profiler with Zend Server - No output / dumps - php

I cant seem to get Xdebug to dump out anything from the profiler. Xdebug itself works just fine, but the profiler is having issues, these are my php.ini settings:
-
[XDebug]
xdebug.profiler_enable=0
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir="C:\Zend\ZendServer\tmp\xdebug-profiler"
xdebug.profiler_output_name = "cachegrind.out.%t-%s"
Anyone experienced this, or have any suggestions?

It seems that Xdebug will not go ahead and create the output directory for you, I created C:\Zend\ZendServer\tmp\xdebug-profiler and the problem is now solved.

Related

Can't get Xdebug (WAMP) to work with Atom

I use WAMP locally and Atom as my editor. I want to use Xdebug, so I installed the php-debug package in Atom. In Chrome I have installed the addon "Xdebug Helper" to turn off and on Xdebug with a simple button and I also added the IDE key xdebug-atom in the settings.
I added these lines in php.ini for xdebug:
zend_extension ="c:/wamp/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11.dll"
xdebug.remote_enable=1
xdebug.idekey = "xdebug-atom"
xdebug.remote_host=127.0.0.1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=false
And in Atom I added these lines in config.cson:
"php-debug":
ServerAddress: "127.0.0.1"
ServerPort: 9000
currentPanelHeight: "292px"
currentPanelMode: "bottom"
I can toggle the Xdebug window in Atom and also set a breakpoint in my php script. But nothing happens when I reload my web application, I have tried changing all settings and rebooted both Atom and WAMP several times.
Can anyone see what I am doing wrong?
Finally I got it right. With these settings in php.ini the connection works:
zend_extension ="c:/wamp/bin/php/php5.6.25/zend_ext/php_xdebug-2.4.1-5.6-vc11.dll"
xdebug.remote_enable = On
xdebug.profiler_enable = off
xdebug.profiler_enable_trigger = off
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp/tmp"
xdebug.show_local_vars=0
xdebug.remote_autostart = 0
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000

Xdebug suddenly not properly working on Eclipse Neon PHP Ubuntu 16

It was working properly yesterday, all I did today was installing docker, which shouldn't have anything to do with it.
The situation is that I can start debugging, but when I hit any of the "Step" (F5, F6, F7, F8) buttons it will say "PHP Applications (Waiting...)" as if it was executing code, but it will never end.
If I disable "Break at First Line" it will even go to the breakpoint, and I can evaluate any variable previous to the breakpoint, but it won't continue.
I've tried creating new projects, reinstalling xdebug and php, switching the port, uninstalling docker just in case, changing xdebug parameters in php.ini.
The thing is that the debugger works, but only until the first breakpoint.
php.ini:
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.profiler_output_dir="/tmp/xdebug/"
xdebug.profiler_enable=off
xdebug.profiler_enable_trigger = off
xdebug.remote_enable=on
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.idekey=ECLIPSE_DBGP
xdebug.remote_connect_back=1
xdebug.show_local_vars=0
xdebug.max_nesting_level=400
Some of the variables I added for testing, with no success.
phpinfo()
Finally I had some time to play with configurations, after reinstalling xdebug for php7, trying different rules in /etc/php/7.0/cli/conf.d/20-xdebug.ini, I read in a github project issues thread:
I solved by remove all Watch Variables.
And I thought, "it cannot be that", but gave it a chance, and it did it. Maybe playing with the .ini file helped, but what made it work at last was removing all the expressions in eclipse debug window.
Here is the git issue thread (the project is a PHP Debug Adapter for Visual Studio that has nothing to do with my environment): https://github.com/felixfbecker/vscode-php-debug/issues/205
Anyway here is the 20-xdebug.ini configuration that is working for me:
zend_extension="/usr/lib/php/20160303/xdebug.so"
xdebug.remote_autostart=on
xdebug.remote_enable = On
xdebug.remote_port = 9000
xdebug.remote_host = 127.0.0.1
xdebug.show_error_trace = 1
xdebug.remote_handler="dbgp"

Xdebug for netbeans and XAMPP not working

I am trying to debug php code using Netbeans but I am unable to, it keeps showing Waiting for connection just like the image below and it stays like that.. I have opned the php.ini and found no xdebug so I added the following lines after installing xdebug and placing it in the path mentioned below.. please let me know what could the issue be .. i am out of ideas ...
[XDebug]
; Note that profiler is enabled separately.
zend_extension="C:\xampp\php\ext\php_xdebug-2.5.0-7.0-vc14-x86_64"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_autostart=0
xdebug.remote_connect_back=0
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=0
xdebug.profiler_output_name=cachegrind.out.%s.%t
xdebug.profiler_output_dir="C:/WampDeveloper/Temp/xdebug"
xdebug.trace_output_dir="C:/WampDeveloper/Temp/xdebug"

XDEBUG remote enable not enabaling

this is my php.ini file for xdebug
[Xdebug]
zend_extension=C:\wamp64\bin\php\php7.0.0\ext\php_xdebug-2.4.0-7.0-vc14-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_port=9000
xdebug.profiler_enable=1
xdebug.profiler_output_dir=C:\wamp64\tmp
but according to php info, remote enable is disabled.
If I go into phpstorm under interpreters it recognizes xdebug as the debugger. Let me know if you need more informatoini.
edit:
I have tried #lllypa sloution to no avail. I am using windwos 10, firefox, and wamp 3.0.0 64bit with php 7
I reinstalled the server to find this and it is still not working. I can access the localhost, and php scripts work but I can't debug.
[xdebug]
zend_extension = C:\wamp64\bin\php\php7.0.0\ext\php_xdebug-2.4.0-7.0-vc14-x86_64.dll
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="C:/wamp64/tmp"
xdebug.show_local_vars=0
As I can understand from the question and a tag, you're using Windows and WAMP, right? WAMP has multiple php.ini files:
%Apache folder%\bin\php.ini
%PHP folder%\php.ini
%PHP folder%\phpForApache.ini
As far as I remember, phpForApache.ini is the one that has "final" values, so see if it has xdebug settings. Or to be sure, that you are editing the right *.ini file, use WAMP app (on the taskbar click WAMP icon -> PHP -> php.ini).
Let us know if this helps or give us more details on your system and steps you're doing.
PS. Try adding these parameters to your settings:
xdebug.remote_host = 127.0.0.1
xdebug.remote_port = 9000
xdebug.remote_handler = dbgp
And make sure you're running your project on the same host. And if phpstorm has some xdebug configuration - make sure port is the same.

Netbeans xdebug nightmare

I know what you're thinking, ANOTHER netbeans xdebug post?
Well, I've tried everything I've seen in other posts, and nothing seems to work. Here's my setup:
OS: Ubuntu 9.10
PHP: 5.2.1
Netbeans: 6.8
The following is in my /etc/php5/apache2/php.ini
zend_extension=/usr/lib/php5/20060613/xdebug.so
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.idekey="netbeans-xdebug"
I've tried switching ports (I've tried 9001, 9002, and 9034 so far), using zend_extension_ts, adding additional xdebug parameters in the config file, but nothing seems to work: Netbeans still says it's waiting for connection (netbeans-xdebug)
If I look at my phpinfo, I do see a whole section on xdebug, and the parameters are correct.
Any help would be greatly appreciated!
I have no idea what happened, but I switched my debug port to 9000 and upgraded to Netbeans 6.9, and it works now.
adding those lines solved my problems (usually)
xdebug.remote_enable = on
xdebug.profiler_enable = on
xdebug.profiler_enable_trigger = on
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir = "c:/wamp/tmp"
xdebug seems not working in "run as script" mode
try it on your local website

Categories