Webmaster | 9 Apr 07:38 2012

Can't connect to Xdebug

I have installed NetBeans IDE 7.1.1 and want to be able to debug.

I’m running Windows XP 32-bit

Here’s my Summary based on phpinfo. The location to move the downloaded file in line 2 what also blank before installing xdebug.

 

 

 

 

XDEBUG EXTENSION FOR PHP | DOCUMENTATION | INSTALLATION

home | updates | download | documentation | contributing | license | support | issue tracker

 

If you like Xdebug, please consider buying a
"support agreement".

Or Flattr this website:

Tailored Installation Instructions

Summary

·  Xdebug installed: 2.1.4

·  Server API: Apache 2.0 Handler

·  Windows: yes - Compiler: MS VC9 - Architecture: x86

·  Zend Server: no

·  PHP Version: 5.3.8

·  Zend API nr: 220090626

·  PHP API nr: 20090626

·  Debug Build: no

·  Thread Safe Build: yes

·  Configuration File Path: C:\WINDOWS

·  Configuration File: C:\xampp\php\php.ini

·  Extensions directory:

You're already running the latest Xdebug version

But here are the instructions anyway:

  1. Download php_xdebug-2.1.4-5.3-vc9.dll

  2. Move the downloaded file to

  3. Update C:\xampp\php\php.ini and change the line
    zend_extension = \php_xdebug-2.1.4-5.3-vc9.dll

  4. Restart the webserver

If you like Xdebug, and thinks it saves you time and money, please have a look at the donation page.

 

 

This site and all of its contents are Copyright © 2002-2012 by Derick Rethans.
All rights reserved.

 

 

As you can see in line 2 of the Summary it did not tell me where to put the dll so I put it in c:\xampp\php

 

In the php.ini I set zend_extension = \php_xdebug-2.1.4-5.3-vc9.dll but that didn’t work so I then set it to zend_extension = "C:\xampp\php\php_xdebug-2.1.4-5.3-vc9.dll"

I also set the following 4 statements in the c:\xampp\php\ php.ini

xdebug.remote_enable = 0

xdebug.remote_handler = "dbgp"

xdebug.remote_host = "localhost"

xdebug.remote_port = 9000

 

All four lines were commented out originally.

 

When I try to debug in NetBeans I only get a “waiting for connection (netbeans-xdebug)” indicator at the bottom but it never makes a connections.

 

Can you tell me what I need to do differently to get xdebug to work?

Thank you,

 

Don Nicoll

480.629.8400

 

Frank Fegert | 30 Mar 23:52 2012
Picon
Picon

Xdebug on AIX

Hello all,

while building Xdebug on AIX (6.1.7.1, with IBM XL C/C++ for AIX, V10.1)
i ran into some minor problems for which i'd like to propose the attached
patch against the v2.1.4 sources.

I'm also having trouble understanding why the Xdebug timing results differ
so fastly between Linux and AIX when displayed with KCachegrind (v0.5.1
on Debian). The Apache, PHP, Xdebug and PHP-application versions on both
platforms are - as well as the content - exactly the same. The only known
differences are the OS and the compilers (gcc vs. xlC) used. From test
runs with siege i'm seeing a factor of ~3 between the page delivery times
on Linux vs. AIX. The raw Xdebug profiles seem to support this, i'm seeing
factors between two and four when manually comparing the individual call-
grind cost lines in the raw profile output. Upon loading the profiles into
KCachegrind i get e.g.:

  Linux: "Total Time Cost: 17 600"
  AIX:   "Total Time Cost: 1 287 141"

for absolute time values. Does someone have an idea what causes these
huge differences?

Thanks & best regards,

    Frank Fegert
Attachment (php-xdebug.patch): text/x-diff, 4794 bytes
Klaus Dorsch | 14 Mar 15:26 2012
Picon

Zend API Version

Hello,

 

Would you please so nice to send me the  right Versionnumber of xdebug for the

Zend Engine API version 220060519 .

 

Thank you very much

 

Mit freundlichen Grüßen / Best Regards

 

Klaus Dorsch

 

 

Tel.:    0221 - 94 20 55 -33

Fax:    0221 - 94 20 55 -35

dorsch <at> truman.de

 

Truman Textilien GmbH

Widdersdorferstrasse 181-183

50825 Köln

 

Amtsgericht Köln: HRB 23490

Geschäftsführer: Roman Trude 

 

Kennen Sie schon unseren TRUMAN-Newsletter mit

Produktempfehlungen, Neuheiten und Spezialangeboten?

Registrieren Sie sich kostenlos unter

http://www.truman.de/Newsletter-anfordern/

 

Service-Zeiten, Montag bis Freitag von 09:00 bis 18:00 Uhr

 

 

Diese eMail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder

diese eMail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese eMail. Das unerlaubte

Kopieren sowie die unbefugte Weitergabe dieser eMail ist nicht gestattet.

 

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this

e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution

of the material in this e-mail is strictly forbidden.

 

 

 

David | 13 Mar 13:15 2012
Picon

How to debug php code run with exec()

Hi,

I'm trying to debug php code launched from a php "launcher" script with a exec() call. I'm being able to debug the "launcher" php code with vim + xdebug plugin, but I cannot debug any line of the php code executed with that exec() call.


Is there any way to do it? The XDEBUG_CONFIG environment variable is correctly set before the call to exec(). Also, launching the php code with something like exec("export XDEBUG_CONFIG="whatever"; cmd php PhpCodeICannotDebug.php") does not work either.


Regards,
David
dendixon | 12 Mar 22:22 2012

SOLVED-installing xdebug-2.1.3

SOLVED - Solution was simple (as always):

The directory to run the command is :
/opt/xdebug-2.1.3/xdebug-2.1.3

NOT: /opt/xdebug-2.1.3
I was in a directory one level too high.

Sorry for bothering you with this question.

**********
Trying to run inside the directory "xdebug-2.1.3" the command:
sudo /opt/lampp/bin/phpize-5.3.8
for lampp 1.7.7

I got the error message:
Cannot find config.m4.
Make sure that you run '/opt/lampp/bin/phpize-5.3.8' in the top level
source directory of the module

I thought I had done the very same thing when installing xdebug on lampp
1.7.2 but maybe not.

Any ideas on why phpize can't find config.m4?
Thanks for any help.

-- 
Dennis Dixon
http://www.mendocinoconnection.com

--

-- 
Dennis Dixon
http://www.mendocinoconnection.com

dendixon | 11 Mar 20:15 2012

installing xdebug-2.1.3

Trying to run inside the directory "xdebug-2.1.3" the command:
sudo /opt/lampp/bin/phpize-5.3.8
for lampp 1.7.7

I got the error message:
Cannot find config.m4.
Make sure that you run '/opt/lampp/bin/phpize-5.3.8' in the top level
source directory of the module

I thought I had done the very same thing when installing xdebug on lampp
1.7.2 but maybe not.

Any ideas on why phpize can't find config.m4?
Thanks for any help.

--

-- 
Dennis Dixon
http://www.mendocinoconnection.com

gary mazzaferro | 15 Feb 08:37 2012

[RESOLVED] (almost) Re: appears installed and enabled,but doesn't seem to work

FIXED: except for logging

It was SeLinux interfering with xdebug.
For a development machine the easiest fix is disabling SeLinux

In file ”/etc/selinux/config”:

SELINUX=disabled
reboot and it should work.
I wasn't able to get the xdebug.log file to update from the apache server.
If you need SeLinux enable like I do, the issue is more complex Use the "setsebool -P httpd_can_network_connect 1"
and it should work.

If you need file writing turned on, its more complicated.

UPDATE THE DOCUMENTATION !!! please.

cheers
On Tue, Feb 14, 2012 at 9:17 PM, gary mazzaferro <garym <at> oedata.com> wrote:
One more update; 

I tried setting the idekey in the environment and executing a php script from the command line. 
Both, the debugclient and netbeans was able to capture the debug.

The problem is the php scripts on the apache 2.2 server are not launching the remote.

I even placed the 'xdebug.idekey=netbeans-xdebug' in php.ini file without positive result.
I also used the "Easy xdebug" plugin on fire fix without positive result.

Any help ?? 


On Tue, Feb 14, 2012 at 11:03 AM, gary mazzaferro <garym <at> oedata.com> wrote:

On Tue, Feb 14, 2012 at 7:34 AM, gary mazzaferro <garym <at> oedata.com> wrote:
Hi,

I installed xdebug, but can't seem to make it work. I have a simple hello.php file in Documentroot with a syntax error and the remote xdebug wil not launch. I tried with netbeans and the debugclient, without success.

Additionally, the is no log file created.

How can I get xdebug to launch ?

b/r
-g

This is a quick update:

I uninstalled php and xdebug, reinstalled the stack and now I get the stack trace in the browser.

The remote still as dead as ever. I also disabled the firewall, just in case.

 

Distribution; Centos 6.2

OS:
Linux localhost.localdomain 2.6.32-220.4.1.el6.x86_64 #1 SMP Tue Jan 24 02:13:44 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux

This is the URL:
http://localhost/hello.php?XDEBUG_SESSION_START=netbeans-xdebug

This is the version info:
PHP 5.3.3 (cli) (built: Feb  2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans

This is the configuration from PHPInfo:
xdebug

xdebug support => enabled
Version => 2.1.3

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.145 $

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.file_link_format => no value => no value
xdebug.idekey => garym => no value
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.overload_var_dump => On => On
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => Off => Off
xdebug.remote_connect_back => Off => Off
xdebug.remote_cookie_expire_time => 3600 => 3600
xdebug.remote_enable => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => localhost => localhost
xdebug.remote_log => /tmp/xdebug.log => /tmp/xdebug.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.scream => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /tmp => /tmp
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3





gary mazzaferro | 14 Feb 15:34 2012

appears installed and enabled,but doesn't seem to work

Hi,

I installed xdebug, but can't seem to make it work. I have a simple hello.php file in Documentroot with a syntax error and the remote xdebug wil not launch. I tried with netbeans and the debugclient, without success.

Additionally, the is no log file created.

How can I get xdebug to launch ?

b/r
-g

Distribution; Centos 6.2

OS:
Linux localhost.localdomain 2.6.32-220.4.1.el6.x86_64 #1 SMP Tue Jan 24 02:13:44 GMT 2012 x86_64 x86_64 x86_64 GNU/Linux

This is the URL:
http://localhost/hello.php?XDEBUG_SESSION_START=netbeans-xdebug

This is the version info:
PHP 5.3.3 (cli) (built: Feb  2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.1.3, Copyright (c) 2002-2012, by Derick Rethans

This is the configuration from PHPInfo:
xdebug

xdebug support => enabled
Version => 2.1.3

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.145 $

Directive => Local Value => Master Value
xdebug.auto_trace => Off => Off
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 0 => 0
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.file_link_format => no value => no value
xdebug.idekey => garym => no value
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.overload_var_dump => On => On
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => cachegrind.out.%p => cachegrind.out.%p
xdebug.remote_autostart => Off => Off
xdebug.remote_connect_back => Off => Off
xdebug.remote_cookie_expire_time => 3600 => 3600
xdebug.remote_enable => On => On
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => localhost => localhost
xdebug.remote_log => /tmp/xdebug.log => /tmp/xdebug.log
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.scream => Off => Off
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => Off => Off
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir => /tmp => /tmp
xdebug.trace_output_name => trace.%c => trace.%c
xdebug.var_display_max_children => 128 => 128
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 3 => 3


nhoeller | 14 Feb 04:41 2012
Picon

xdebug.trace_format Does Not Change cachegrind.out.nnnn Format

I installed xdebug 2.1.3 on a CentOS 5 system running PHP 5.2.13 and Apache 2.2.3.  I updated php.ini with the following, appended XDEBUG_PROFILE=1 to a Drupal URL and was able to get a function trace.

zend_extension=/usr/lib64/php/modules/xdebug.so
xdebug.profiler_enable_trigger = 0
xdebug.profiler_output_dir = "/tmp"

I then set xdebug.profiler_enable_trigger = 1, add the following lines and restarted Apache.  However, the format of the output file looks identical to what I had before.  Setting xdebug.profiler_enable_trigger = 2 made no difference.  I verified that the values are being picked up using phpinfo(),

xdebug.collect_params = 4
xdebug.collect_return = 1

Am I missing something obvious?
     Thanks, Norbert
Manmohan Sethi | 13 Feb 09:22 2012
Picon

Not able to get the xdebug working

Hi,

I am a novice in the Open source world and was looking for a PHP debugger. I got xdebug. I downloaded the xdebuf veriosn 2.1.3 and installed it on Ubuntu 10.04, PHP version 5.2.3. . The Xdebug information is appearing in phpinfo. php5 -m is also showing xdebug under the Zend module. I have made the following entries in php.ini files at two different locations:

zend_extension = /usr/lib/php5/20090626+lfs/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_host = localhost
xdebug.remote_port = 9000
xdebug.remote_log = /home/abc/xdebug_logs/xdebug.log

I am using Netbeans 7.1 for PHP to dubug my PHP projects. I have already done the port and other setting for the xdebug in Netbeans, still the Netbeans is not able to connections to the xdebug.I also tried the command:

mac <at> mac-desktop:/$debugclient

But it is showing the following result:

mac <at> mac-desktop:/$ debugclient
Xdebug Simple DBGp client (0.10.0)
Copyright 2002-2007 by Derick Rethans.
- libedit support: enabled
bind: couldn't bind AF_INET socket?

I tried googling around and found that this is normal behavior. The debugclient will retry every 5 seconds until the OS frees 
it. This is normal behavior. However, I didn't find any solution about how I can remove this error and make connection to the xdebug server via Netbeans or even via debugclient command.
Any help would be highly appreciated. 

-- 
Thanks

Manmohan

“Your attitude, not your aptitude, will determine your altitude”
Taavi Burns | 9 Feb 20:39 2012
Picon

Use a flat array for line coverage. (take 2)

I revisited the line coverage data structure refactoring I did in the
summer. It still looks like a fairly easy 4% win in overall
performance when running PHPUnit's own test suite (with coverage).

https://github.com/derickr/xdebug/pull/15

Thanks for accepting my other patches! I didn't see any comments on
this particular bit, so I have no idea if it just lay forgotten or if
it's not stylistically correct or… Just wondering if there's anything
else I can do to help get this (or something like it) merged in (or
knowing that it's not interesting to the project as a whole).

Have a great day!

--

-- 
taa
/*eof*/


Gmane