Dotan Cohen | 30 Jan 18:00 2013
Picon
Gravatar

Xdebug in VIM: waiting for a new connection on port 9000 for 10 seconds... Connection Timeout

I am trying to use Xdebug in VIM on Ubuntu Linux. Here are my settings:
$ cat /etc/php5/apache2/conf.d/20-xdebug.ini
zend_extension=/usr/lib/php5/20100525/xdebug.so
xdebug.remote_host = 127.0.1.1

However, when I try to connect to
http://127.0.1.1/phpinfo.php?XDEBUG_SESSION_START=1 I get only this
output in VIM:
waiting for a new connection on port 9000 for 10 seconds...
Connection Timeout

Of course, I enabled Xdebug (with F5) before calling the page in
Firefox, and of course I did the call in the allotted time frame.

I do see these config parameters in the output of phpinfo():
xdebug
xdebug support	enabled
Version 	2.2.1
IDE Key 	1

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

Directive	Local Value	Master Value
xdebug.auto_trace	Off	Off
xdebug.cli_color	0	0
xdebug.collect_assignments	Off	Off
xdebug.collect_includes	On	On
xdebug.collect_params	0	0
xdebug.collect_return	Off	Off
(Continue reading)

E Barcellos | 29 Jan 11:12 2013
Picon

Quick Question

Hello

 

“Xdebug does not work together with the Zend Optimizer or any other extension that deals with PHP's internals (DBG, APD, ioncube etc). This is due to compatibility problems with those modules.”

 

I am a newbie. Does this mean that I cannot run Xdebug on a system which has some vhosts that depend on ioncube (as in, I can’t take ioncube dependent vhosts offline and it wouldn’t do any good anyways to debug without the ioncube vhosts enabled) ?

 

Or is it possible to run Xdedug just for the non ioncube dependent vhosts?

 

Thank you.

 

PS: If I can use Xdebug I will gladly make a donation.

 

 

General Mail | 26 Jan 21:24 2013
Picon

Debuging with namespaces

PHP Version: PHP 5.3.15
Xdebug Version: Xdebug v2.2.1

I having problems debugging PHP code that contain namespaces, the paths 
returned by Xdebug are invalid, IE:

/mnt/Workspace/ZippeeFramework2/Library/Classes/Database/Sql/Insert.php.ZF2\Database\Sql\Insert->getSqlStatement()

It should simply be 
/mnt/Workspace/ZippeeFramework2/Library/Classes/Database/Sql/Insert.php.

Is there anything I can do to remedy this?

Here is partial code:

$update = new \ZF2\Database\Sql\Insert( 'Employees' );
$emp[ 'John' ] = 'Mike D.';
$emp[ 'Fat' ] = 'Skinny';
$update->values( $emp );
var_dump( $update->getSqlStatement() );

Any assistance on this matter would be really appreciate it.

- Regards

Enzo Maddalena | 14 Jan 20:12 2013
Picon

log string assignments

Hello,

Is it possible to log the point in the program when a string is created.

For example:

echo 'my string';

Is there any configuration that will let me know the 'my string' was echo'd?

Also with variables:

$var='var';
echo "my $var"

I am looking for something like:

line 22, ''my var" created, echo'd

Nathan | 3 Jan 17:24 2013
Picon

xdebug over Google Chrome

Over the last few years Google Chrome has began to take over the interweb but until recently has lacked extend-ability for crazy app ideas. It also seems like xdebug or other remote debugging apps/extensions/plugins have lacked good integration for programs to work with it (in my opinion). It seems like if you find a good editor you like it does not work with xdebug and if you find an editor you can work with the debugging support is a pain to setup and still requires the server to be properly configured to talk to the editor, the editor to be configured to handle the requests properly and initiate browser requests properly.

In today's web development most developers work with javascript, css, (X)HTML, SSS (Server Side Scripting) and maybe even XSL, XML, XPATH and/or SQL. As it stands (from personal experience and majority of the people I know that work in this field) use Google Chrome for most of my/their web development needs mostly because it is a good debugging tool for CSS, (X)HTML and Javascript but lacks almost any SSS dev support.

In short what I am asking is if anyone has heard of any projects or anything that work with Google Chrome's Developer tools to work with Server Side Scripting debugging? If not I believe I will start one and would like to seek help.

Thanks,
-Nathan Bruer
Henk Kroon | 17 Dec 21:16 2012
Picon

Installing and enabling Xdebug on MAMP PRO

I am trying to set up Xdebug on my MAMP PRO installation. I tried xdebug.org/wizard.php to get the correct Xdebug version with custom installation instructions but I got stuck.

According to step 4 in the tailored installation instructions (see http://i49.tinypic.com/33nvt5w.png) I should get the following output:

    Configuring for:
    ...
    Zend Module Api No:      20100525
    Zend Extension Api No:   220100525

But my output reads as follows:

    Configuring for:
    PHP Api Version:         20090626
    Zend Module Api No:      20090626
    Zend Extension Api No:   220090626

Next I try the instructions (see http://i48.tinypic.com/1247v37.png) at xdebug.org/docs/faq#custom-phpize because the tailored installation instructions advice me to do so.


I undo the first step by deleting xdebug-2.2.1.tgz and the unpacked folder and then I start at step 1 again. My input for step 4 is

    /Applications/MAMP/bin/php/php5.4.4/bin/phpize

and the output reads as follows:

    grep: /Applications/MAMP/bin/php/php5.4.4/include/php/main/php.h: No such file or directory
    grep: /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend_modules.h: No such file or directory
    grep: /Applications/MAMP/bin/php/php5.4.4/include/php/Zend/zend_extensions.h: No such file or directory
    Configuring for:
    PHP Api Version:        
    Zend Module Api No:     
    Zend Extension Api No: 

My guess would be that I need to install php.h, zend_modules.h and zend_extensions.h but I can not find them on the web. How do I best proceed in order to install Xdebug?

Thanks.


Robert Henry | 5 Dec 20:03 2012
Gravatar

getting true statement counts from xdebug

Is there a way to get statement counts from the xdebug code coverage
tool?  Currently, the code coverage tool yields a 1 or -1 value,
indicating "executed", rather than the number of times the statement
was executed.

--

-- 
Robert Henry, New Relic

Nicolas BOUSSIER | 3 Dec 09:24 2012
Picon

feature request for debugging mobile apps

Hello,


I'm actually creating a mobile app that make request on a php application (online shop).


It could be very usefull to be able to specify in the xdebug cookie a specific remote_connect_back IP address.

In such case, the remote_connect_back address is not the IP address of the terminal who made the request (mobile) but the IP address of the computer where the PHP  IDE is running.

Actually, I have set up the xdebug.remote_host parameter and it works, but in this limits the use to only one developer.


Best regards


N. BOUSSIER



General Mail | 2 Dec 15:08 2012
Picon

Re: Unable to get Xdebug to connect to client

I am sorry, can you please elaborate ?

On 12/1/2012 8:46 PM, Ilan Berkner wrote:
> Unsubscribe
>
> On Dec 1, 2012 5:03 PM, "General Mail" <general <at> bombshellz.net
> <mailto:general <at> bombshellz.net>> wrote:

General Mail | 1 Dec 22:56 2012
Picon

Unable to get Xdebug to connect to client

Hello,

In the past, I have had great experiences with getting Xdebug to 
cooperate flawlessly with Eclipse PDT (I've switched to Aptana Studio 
3). I'll elaborate a bit more on my setup:

OS: Linux (OpenSUSE 12.2 Text Install)
PHPv: PHP 5.3.15
Running in VM (VirtualBox), Host Windows 7.
The IDE is running on the Host.
Firewall (on host): Comodo Firewall, VirtualBox network is whitelisted
Firewall (on guest): Disabled

Ran the following test for connectivity (inside the guest, I can contact 
the host via 192.168.56.1 (which also acts as a gateway)):

linux-i23u:/mnt/Workspace/openZ-stable # telnet 192.168.56.1 9000
Trying 192.168.56.1...
Connected to 192.168.56.1.
Escape character is '^]'.

Success!

Consequently I checked my firewall log (as the rule is set to log 
events) and the event is logged as successful (it also show the 
application that is processing the socket).

I checked XDEBUG_CONFIG environment variable:

linux-i23u:/mnt/Workspace/openZ-stable # echo $XDEBUG_CONFIG
idekey=ECLIPSE_DBGP_192.168.56.1

Here is a snapshot of my xdebug configuration settings:

zend_extension="/usr/lib64/php5/extensions/xdebug.so"
xdebug.default_enable=1
;xdebug.remote_autostart=1
xdebug.remote_log="/tmp/xdebug.log"
xdebug.collect_params=3
xdebug.collect_return=1
xdebug.remote_host="192.168.56.1"
xdebug.remote_port=9000
;xdebug.idekey="ECLIPSE_DBGP"

Everything seems to be order however from what I can deduced from 
'strace', 'tcpdump', and firewall events. There seems to be NO 
CONNECTION being made and I conclude that I must be missing something 
for xdebug to function as expected?

P.S. More information:

xdebug support => enabled
xdebug.auto_trace => Off => Off
xdebug.cli_color => 0 => 0
xdebug.collect_assignments => Off => Off
xdebug.collect_includes => On => On
xdebug.collect_params => 3 => 3
xdebug.collect_return => On => On
xdebug.collect_vars => Off => Off
xdebug.coverage_enable => On => On
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 => no value => no value
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 => Off => Off
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => 192.168.56.1 => 192.168.56.1
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_enable_trigger => 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
XDEBUG_CONFIG => idekey=ECLIPSE_DBGP_192.168.56.1
_SERVER["XDEBUG_CONFIG"] => idekey=ECLIPSE_DBGP_192.168.56.1

Javier Garcia | 9 Nov 15:36 2012
Picon

vim + xdebug plugin = error code 5

Hi,

I'm using vim to my php apps, and i have just installed a plugin to 
debug them using xdebug. This is the plugin:

https://github.com/ludovicPelle/vim-xdebug

The plugin works ok, and now I'm trying to create a script to automatize 
the some actions, that is: when I press F5 to start to debug, I would 
like to refresh my browser automatically.

So these are the scripts:

~/browser_refresh.sh
~/start_debugging.sh

#~/browser_refresh.sh
WID=`xdotool search --name "Mozilla Firefox" | head -1`
xdotool windowfocus $WID
sleep 2
xdotool key F5

#~/start_debugging.sh
currentwindow=`xdotool search --name "GVIM" | head -1`
xdotool windowactivate $currentwindow
xdotool ke

It seems it works ok, but when press F4 to Step Out i get an error code 
5, even when I put the breakpoint in a line with code. When I do the 
same manually I don't get that error...

Any help?

Javi


Gmane