View Issue Details

IDProjectCategoryView StatusLast Update
0001038XdebugUncategorizedpublic2014-05-02 09:22
Reporterpo_taka Assigned Toderick  
PriorityhighSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSUbuntu 12.04 
Product Version2.2.4 
Fixed in Version2.2.5 
Summary0001038: I'm able to debug only once
Description

Hello,
I'm using xDebug + netbeans.
Just updated to 2.4.4.
The problem is that, it start debug session only once.
The IDE keep connection open, but debug session do not start.
Maybe there is missing "end" of connection. I don't know how the communication is done :)
Bug occur on both netbeans 8.0RC1 and 7.4.
I Downgraded to xDebug 2.4.3 and problem dissipated.

Steps To Reproduce

Start xDebug session, complete debug session. Unable to start debug session again. I need to restart the IDE to start new debug session.

TagsNo tags attached.
Operating System
PHP Version5.3.10

Activities

hxpro

2014-03-19 15:12

reporter   ~0002772

hi,
I have similar problem.
Fedora 20, Netbeans 7.4, php 5.5.10
xdebug 2.2.3 - worked,
after update to xdebug 2.2.4, netbeans unsuccessfull waiting for connection (i cant debug even once)

contemplator

2014-03-26 06:25

reporter   ~0002777

Confirm this bug on Windows XP and Windows 7 with Netbeans 7.4 and 8.0, latest PHP 5.4 and 5.5. Downgrading xdebug helps. Although this is most likely Netbeans issue.

mistbow

2014-04-05 20:44

reporter   ~0002781

Hi!
Confirm this bug on Windows 8.1; PhpStorm 7.1.3, 8.0; PHP 5.5.10, 5.5.11.
Downgrading xDebug to 2.2.3 solve this probem.
Some time debugs, but after next it stops and waiting to infinity...

Please fix it and this http://bugs.xdebug.org/view.php?id=996 issue too!

dvandusen

2014-04-21 13:01

reporter   ~0002787

Last edited: 2014-04-21 20:05

Confirm this on Mac - Mavericks, Netbeans 8. PHP Version 5.4.26 from Bitnami Mampstack, Xdebug v2.2.4. I downgraded to test, installing 2.2.3, and have the same behavior. Same using PHPStorm 7.1.3. Same with debugclient. There is no connection on port 9000 (no listener or sender) after failure.

Following is testing on Netbeans 8.0. Netbeans 7.4 does suffer same issue as far as my testing shows. It appears that the real problem occurs when the debugged task reaches a self-imposed termination from an exception, but this seems rather normal.

I can debug using XDebug on simple Test_XDebug and complex scripts,

(see that port is up:
Port Scan has started…

Port Scanning host: 127.0.0.1

 Open TCP Port:     9000        cslistener

Port Scan has completed…
)

"/mampstack/php/bin/php" "/mampstack/test_xdebug.php"

then a rerun and

"/mampstack/php/bin/php" "/mampstack/test_xdebug.php"
PHP Warning: socket_bind(): unable to bind address [48]: Address already in use in /mampstack/test_xdebug.php on line 5
PHP Stack trace:
PHP 1. {main}() /mampstack/test_xdebug.php:0
PHP 2. socket_bind(resource(4) of type (Socket), '127.0.0.1', 9000) /mampstack/test_xdebug.php:5
Unable to bind --- Error: Address already in use
Done.

(which is expected)

Then I do a debug in Netbeans (this was traced with prints)
cli mode: In: drupal_page_is_cacheable
cli mode: In: &drupal_register_shutdown_function
cli mode: Shutting Down in _drupal_shutdown_function
cli mode: In: &drupal_register_shutdown_function
Done.

(above was expected behavior)

(I leave script above active in NetBeans - I Do not push STOP on debug session)

XDebug still appears active on scan.
Port Scan has started…

Port Scanning host: 127.0.0.1

 Open TCP Port:     9000        cslistener

Port Scan has completed…

BUT I get message in Netbeans: Xdebug Waiting for connection message
-- and XDebug seems to have stoppend in Netbeans, even though this is the only indication.

BUT, then I push Stop on Debug session, and:

Port Scan has started…

Port Scanning host: 127.0.0.1

Port Scan has completed…

So, XDebug is really gone. Also, Netbeans debugging is off.....

This may indicate that NetBeans is the issue, but I can't tell.

I then restart Netbeans - XDebug Waiting for Connection stays on.

Then restart apache and netbeans, and XDebug works again, SOMETIMES

When I run the same script on the command line, I can get it to operate easily, and then:

(cmd) run -i transaction_id
Disconnect

bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?
bind: couldn't bind AF_INET socket?

I am presuming that something in my script in php kills xdebug, and that it is not a netbeans problem really, and that it is really the 'bind: couldn't bind AF_INET socket?' message getting back to netbeans and causing netbeans to lock up.

php.ini relevant
[XDebug]
;; Only Zend OR (!) XDebug
zend_extension="/mampstack/php/lib/php/extensions/xdebug.so"
;xdebug.remote_enable=true
;xdebug.remote_host=localhost
xdebug.default_enable=1
xdebug.profiler_enable=0
xdebug.profiler_output_dir=/tmp
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_connect_back=On

xdebug.auto_trace=On
xdebug.trace_output_dir=/tmp
xdebug.collect_params=3
xdebug.collect_return=On
xdebug.collect_assignments=On
xdebug.collect_vars=On

xdebug.trace_enable_trigger=On
xdebug.trace_output_name=log%u.xt

xdebug.dump_undefined=On
xdebug.scream=Off
xdebug.show_exception_trace=On
xdebug.show_local_vars=On
xdebug.show_mem_delta=On

derick

2014-04-24 22:45

administrator   ~0002788

Can you please try the latest code from github - on the xdebug_2_2 branch? You can get that with:

git clone https://github.com/xdebug/xdebug.git
cd xdebug
git checkout xdebug_2_2

And then you can run:
phpize
./configure
make && make install

If you are on Windows, you can find new binaries at:
http://xdebug.org/files/xdebug-vc9-latest.tgz
or
http://xdebug.org/files/xdebug-vc11-latest.tgz

mistbow

2014-04-25 11:05

reporter   ~0002792

Last edited: 2014-04-25 11:30

I try to use php_xdebug-master-5.5-vc11.dll, and I can't connect to xDebug from PhpStorm.

Apache/2.4.9 (Win32) OpenSSL/1.0.1f PHP/5.5.11

xdebug

xdebug support enabled
Version 2.3.0dev
IDE Key PHPSTORM

I have tried many times. Nothing worked. Then went to drink tea. When I returned, all by itself earned! This is Fantastic!

hxpro

2014-04-25 11:55

reporter   ~0002793

derick, I try from github xdebug_2_2 branch (2.2.5dev) and works fine for me.

dvandusen

2014-04-25 12:13

reporter   ~0002794

I can see why so many issues arise from XDebug, as I understand how timeouts affect the reconnection structure of clients to the xDebug server facility. I hope that the team (the fabulous, wonderful, giving developers) of xDebug will address the timeouts by a self-checking structure (beacon/sentinal, polling etc.) to reestablish the connection whenever it becomes broken and must wait for a timeout. It might be best to allow a user to set a timeout setting to obtain more responsive reconnections. I don't really know the detailed existing structure, so all of this is based upon my observations and what I have seen in various posts related to Xdebug.

dvandusen

2014-04-25 15:18

reporter   ~0002795

Also, please tell me if there is a problem with me or if engine is not updated. I am using PHP 5.4.26. I am using a reinstalled version of XDebug 2.2.5, but get engine of 2.2.3:

-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///mampstack/test_xdebug.php" language="PHP" protocol_version="1.0" appid="92596" idekey="netbeans-xdebug"><engine version="2.3.0dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

dvandusen

2014-04-25 15:20

reporter   ~0002796

Last edited: 2014-04-25 15:20

I do think that there is an issue with Netbeans connecting properly to XDebug. I am very often getting Waiting for Connection, even though xdebugclient and xdebug appear to work well in terminal on Mac.

Log opened at 2014-04-25 15:14:48
I: Checking remote connect back address.
W: Remote address not found, connecting to configured address/port: 127.0.0.1:9000. :-|
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///mampstack/test_xdebug.php" language="PHP" protocol_version="1.0" appid="92596" idekey="netbeans-xdebug"><engine version="2.3.0dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init>

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>

Log closed at 2014-04-25 15:14:57

suspi

2014-04-28 11:50

reporter   ~0002803

I confirm this bug on Windows XP with Eclipse IDE:

PHP 5.2 and XDebug 2.2.4. does not work.
PHP 5.2 and XDebug 2.2.3. works.

PHP 5.4 and XDebug 2.2.4. does not work.
PHP 5.4 and XDebug 2.2.3. works.

pavlosgr

2014-05-01 18:21

reporter   ~0002805

I confirm the problem in
Windows 7 64 bit
xampp 1.8.3
PHP 5.5.11

php.ini
zend_extension = "C:\xampp\php\ext\php_xdebug-2.2.4-5.5-vc11.dll"
xdebug.remote_enable=1
xdebug.remote_autostart=1
xdebug.remote_hander=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=netbeans-xdebug

I downloaded from http://xdebug.org/files/xdebug-vc11-latest.tgz
and used the following
zend_extension = "C:\xampp\php\ext\php_xdebug-master-5.5-vc11.dll"

Problem solved.

derick

2014-05-02 09:22

administrator   ~0002806

Fixed in the recently released 2.2.5: http://xdebug.org/updates.php#x_2_2_5
(It's a duplicate of 0001040)

Issue History

Date Modified Username Field Change
2014-03-18 12:20 po_taka New Issue
2014-03-19 15:12 hxpro Note Added: 0002772
2014-03-26 06:25 contemplator Note Added: 0002777
2014-04-05 20:44 mistbow Note Added: 0002781
2014-04-21 13:01 dvandusen Note Added: 0002787
2014-04-21 13:11 dvandusen Note Edited: 0002787
2014-04-21 13:13 dvandusen Note Edited: 0002787
2014-04-21 13:14 dvandusen Note Edited: 0002787
2014-04-21 16:13 dvandusen Note Edited: 0002787
2014-04-21 16:15 dvandusen Note Edited: 0002787
2014-04-21 16:24 dvandusen Note Edited: 0002787
2014-04-21 16:55 dvandusen Note Edited: 0002787
2014-04-21 16:59 dvandusen Note Edited: 0002787
2014-04-21 17:05 dvandusen Note Edited: 0002787
2014-04-21 17:28 dvandusen Note Edited: 0002787
2014-04-21 18:00 dvandusen Note Edited: 0002787
2014-04-21 20:01 dvandusen Note Edited: 0002787
2014-04-21 20:05 dvandusen Note Edited: 0002787
2014-04-24 22:45 derick Note Added: 0002788
2014-04-24 22:45 derick Assigned To => derick
2014-04-24 22:45 derick Status new => feedback
2014-04-25 11:05 mistbow Note Added: 0002792
2014-04-25 11:30 mistbow Note Edited: 0002792
2014-04-25 11:55 hxpro Note Added: 0002793
2014-04-25 12:13 dvandusen Note Added: 0002794
2014-04-25 15:18 dvandusen Note Added: 0002795
2014-04-25 15:20 dvandusen Note Added: 0002796
2014-04-25 15:20 dvandusen Note Edited: 0002796
2014-04-28 11:50 suspi Note Added: 0002803
2014-05-01 18:21 pavlosgr Note Added: 0002805
2014-05-02 09:22 derick Note Added: 0002806
2014-05-02 09:22 derick Status feedback => closed
2014-05-02 09:22 derick Resolution open => fixed
2014-05-02 09:22 derick Fixed in Version => 2.2.5
2016-07-31 12:36 derick Category Usage problems => Usage problems (Crashes)
2016-07-31 12:38 derick Category Usage problems (Crashes) => Usage problems (Wrong Results)
2020-03-12 16:35 derick Category Usage problems (Wrong Results) => Variable Display
2020-03-12 16:38 derick Category Variable Display => Uncategorized