Bug 180252 - Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug 2.0.5/2.1.0beta2 on opensuse 11.1 64bit
Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug 2.0.5/2.1.0beta2...
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Debugger
6.x
PC Windows 7 x64
: P2 with 8 votes (vote)
: 6.x
Assigned To: rmatous
issues@php
:
: 167447 178816 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-02-04 01:57 UTC by antonx
Modified: 2014-02-16 11:24 UTC (History)
8 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
NetBeans log (2.89 KB, application/octet-stream)
2010-02-04 04:53 UTC, dmitry.s.mamonov
Details
XDebug log (27.25 KB, application/octet-stream)
2010-02-04 04:53 UTC, dmitry.s.mamonov
Details
messages.log + xdebug_log (174.97 KB, application/octet-stream)
2010-02-05 08:14 UTC, antonx
Details
messages log with xdebug logging enabled (249.13 KB, text/x-log)
2010-02-09 07:21 UTC, Filip Zamboj
Details
xdebug.log + netbeans messages.log (1.05 MB, application/zip)
2010-02-11 05:51 UTC, antonx
Details
logfiles for xdebug and netbeans messages.log (206.76 KB, application/zip)
2010-02-11 06:08 UTC, antonx
Details
the logfiles from netbeans and xdebug + the index.php file (15.64 KB, application/zip)
2010-02-17 02:18 UTC, antonx
Details
messages log (42.88 KB, text/x-log)
2010-02-18 03:43 UTC, Filip Zamboj
Details
xdebug log (72.10 KB, text/x-log)
2010-02-18 03:44 UTC, Filip Zamboj
Details
Program counter highlight bug (29.28 KB, image/png)
2010-02-22 12:00 UTC, ajinkya
Details
xDebug log (win7 64bit, php 5.3.1) (454.20 KB, application/octet-stream)
2010-02-23 12:01 UTC, ajinkya
Details
netbeans' log (win7 64bit, php 5.3.1) (506.25 KB, application/octet-stream)
2010-02-23 12:05 UTC, ajinkya
Details
screen shot (win7 64bit, php 5.3.1) (146.88 KB, image/png)
2010-02-23 12:15 UTC, ajinkya
Details
xdebug log (318.74 KB, text/x-log)
2010-02-24 02:39 UTC, Tomas Mysik
Details
xdebug.log and messages (21.70 KB, application/zip)
2010-03-01 05:42 UTC, antonx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description antonx 2010-02-04 01:57:40 UTC
I use:
- opensuse lunix 11.1 64 bit
- php 5.3.1
- xdebug 2.0.5 ( the problem exists with xebug 2.1.0beta too)
- Netbeans 6.8
- firefox 3.5.7 or 3.6

The whole time I had php 5.2.11 installed and it worked quite well.

Now I updated to php 5.3.1 and I get the following problems:
1. I set a breakpoint in my php file
2. I start to debug from netbeans
3. I see that Netbeans stops at the breakpoint (the green line)
4. Now I continue to step-through my code line by line
   Note: most of the time I do not see local variables,
         with php 5.2.11 I saw the variables.
5. After 1...n steps I get an error dialog from netbeans
   telling me:
   "Socket exception occoured" telling me to
    delete some watches and debugging is finished.

   
While this does not crash apache, I set the priority to P1 because
actually its unusable.

Note: I did the tests without using watches.
Comment 1 rmatous 2010-02-04 02:12:10 UTC
Please, could you provide a logging information:
http://wiki.netbeans.org/HowToConfigureXDebug#Enable_Xdebug_logging
Comment 2 dmitry.s.mamonov 2010-02-04 04:50:15 UTC
Same problem for me:
  - WinXP Professional
  - PHP 5.3.1 (cli) (built: Nov 19 2009 09:49:51)
  - Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
  - with Xdebug v2.1.0beta2-dev, Copyright (c) 2002-2010, by Derick Rethans
  - NetBeans 6.7.1 (but I have downloaded PHP plugin separately, so it might be newer)
  - Console PHP application, no  web servers

The problem description is exactly as explained above by antonx.

See attachements with logs I will add.
Comment 3 dmitry.s.mamonov 2010-02-04 04:53:06 UTC
Created attachment 93848 [details]
NetBeans log
Comment 4 dmitry.s.mamonov 2010-02-04 04:53:33 UTC
Created attachment 93849 [details]
XDebug log
Comment 5 Filip Zamboj 2010-02-04 09:42:28 UTC
How did you install xdebug? From sources or some packages/installers?
Comment 6 dmitry.s.mamonov 2010-02-05 00:29:59 UTC
To Filip Zamboj
>How did you install xdebug? From sources or some packages/installers?

Not from sources not installers.

I have downloaded xdebug as dll (directly from xdebug website),
actually I have tested both beta1 and beta2 versions, same result.

Here is my xdebug configuration (php -m works fine):

[Zend]
;zend_extension="c:\bin\php\php_xdebug-2.1.0beta1-5.3-vc9-nts.dll"
zend_extension="c:/bin/php/php_xdebug-2.1.0beta2-5.3-vc9-nts.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log=c:/bin/php/xdebug.log


---
Also, might be it whould help:
http://bugs.xdebug.org/view.php?id=530
Comment 7 antonx 2010-02-05 08:14:22 UTC
Created attachment 93915 [details]
messages.log + xdebug_log

these are the logfiles
Comment 8 antonx 2010-02-05 08:16:53 UTC
Hi,

I just reproduced the bug
and attached the logfiles.

What I did:

- run until a breakpoint stopped me

- stepped through with F8 ... 10 times (nearly)

- waitet 10 sec  ( i made a little pause)

- stepped again with F8

- I got the socket exception


(In reply to comment #1)
> Please, could you provide a logging information:
> http://wiki.netbeans.org/HowToConfigureXDebug#Enable_Xdebug_logging
Comment 9 antonx 2010-02-05 09:02:59 UTC
I just did a test with the brand new xdebug-2.1.0beta2

the problem is still here.
Comment 10 Quality Engineering 2010-02-08 21:38:59 UTC
Integrated into 'main-golden', will be available in build *201002090200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e71c5b5cf4ab
User: Radek Matous <rmatous@netbeans.org>
Log: - #180252 - Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug 2.0.5 on opensuse 11.1 64bit
- #177242 - Ending Xdebug session doesn't stop script from running on server
- unrelated refactoring changes
Comment 11 rmatous 2010-02-09 02:56:38 UTC
snip from: http://bugs.xdebug.org/view.php?id=520 derick's comments
> From the logs it looks like netbeans runs "property_get" after the script has 
> ended... don't know why, but that is what happens.
> 
> (I can see this clearly as a netbeans issues btw)

snip from: http://xdebug.org/docs-dbgp.php
> stopping:
>     State after completion of code execution. This typically happens at the 
> end of code execution, allowing the IDE to further interact with the debugger > engine (for example, to collect performance data, or use other extended 
> commands).

> Likewise, at the end of a debug session, there is a 'stopping' state. This 
> state is entered after all execution is complete. For most debugger engine  
> implementations, only a 'stop' command can be accepted at this point, however 
> some implementations may provide additional commands for retrieving various 
> data from the engine for post debug session processing. 


Fixed by:
http://hg.netbeans.org/web-main/rev/e71c5b5cf4ab
http://hg.netbeans.org/web-main/rev/72fc31a44e21

- #180252 - Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug 2.0.5
on opensuse 11.1 64bit
- #177242 - Ending Xdebug session doesn't stop script from running on server
- unrelated refactoring changes

This fix doesn't fix problems with eval command(watches)
Comment 12 antonx 2010-02-09 06:08:15 UTC
Hi,

I just downloaded the build *201002090200*
(only the php version).

I tried to debug but it didnt work.

It stopped at the first beakpoint,
then after pressing the F8 key nothing happend

no error, no more "green line" indicating me
the position of the debugger.

I tried a second time, the same as soon as you
do a step with F7 or F8 ... debugging seems to be gone.

after pressing n-times F8 I got again the socket exceptions.
... and unfortunately, this development build tries to 
scan my whole home dir (at least its what its displayed)
and blocks my whole system.

So I did no more test for now.

Conclusion: the problem is still here.

(In reply to comment #10)
> Integrated into 'main-golden', will be available in build *201002090200* on
> http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
> Changeset: http://hg.netbeans.org/main/rev/e71c5b5cf4ab
> User: Radek Matous <rmatous@netbeans.org>
> Log: - #180252 - Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug
> 2.0.5 on opensuse 11.1 64bit
> - #177242 - Ending Xdebug session doesn't stop script from running on server
> - unrelated refactoring changes
Comment 13 Filip Zamboj 2010-02-09 06:53:24 UTC
(In reply to comment #12)
> Hi,
> 
> I just downloaded the build *201002090200*
> (only the php version).
> 
> I tried to debug but it didnt work.

Here is working ... 
PHP 5.3.3-dev (cli) (built: Feb  8 2010 13:14:21) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans


> It stopped at the first beakpoint,
> then after pressing the F8 key nothing happend
> 
> no error, no more "green line" indicating me
> the position of the debugger.

> I tried a second time, the same as soon as you
> do a step with F7 or F8 ... debugging seems to be gone.

I am trying to get socket exception as you mentioned but I can't. Debugging is working. However, you mentioned you don't see any variables in variables view - looks like there is bug - about to be evaluated. 

Are you sure you don't have any watches entered in watches view? (They can be harmful even if watches view is not displayed.)

> after pressing n-times F8 I got again the socket exceptions.
> ... and unfortunately, this development build tries to 
> scan my whole home dir (at least its what its displayed)
> and blocks my whole system.

Scanning your whole home dir is very weird and I doubt it's netbeans problem (nobody else has ever reported this) - don't you have it on include path (project properties)? 
 
> So I did no more test for now.
> 
> Conclusion: the problem is still here.
> 
> (In reply to comment #10)
> > Integrated into 'main-golden', will be available in build *201002090200* on
> > http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
> > Changeset: http://hg.netbeans.org/main/rev/e71c5b5cf4ab
> > User: Radek Matous <rmatous@netbeans.org>
> > Log: - #180252 - Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug
> > 2.0.5 on opensuse 11.1 64bit
> > - #177242 - Ending Xdebug session doesn't stop script from running on server
> > - unrelated refactoring changes
Comment 14 Filip Zamboj 2010-02-09 07:20:45 UTC
well, I got a socket exception. see attached file. 

You have to stop debugging session after socket exception is thrown but green highlighting of last evaluated row persists. You need to restart netbeans to get rid of it.
Comment 15 Filip Zamboj 2010-02-09 07:21:55 UTC
Created attachment 94000 [details]
messages log with xdebug logging enabled
Comment 16 rmatous 2010-02-09 07:36:03 UTC
hmm, broken pipe after eval command which is long term xdebug problem: watches, baloon evaluation cause it. Anyway different issue and not bug in netbeans
Comment 17 rmatous 2010-02-09 08:05:41 UTC
antonx, I've overlooked your comment that it still doesn't work for you. Sorry for that. In attached logs(your's, Filip's) I can see following sequence: "eval -i .." followed by broken communication, which is known xdebug bug(eval), cannot be fixed in NB 

anyway if this issue happens to you and your logging doesn't contain "eval -i .." then please reopen this issue, thanks for you help
Comment 18 Filip Zamboj 2010-02-09 08:35:53 UTC
(In reply to comment #0)

> 4. Now I continue to step-through my code line by line
>    Note: most of the time I do not see local variables,
>          with php 5.2.11 I saw the variables.

bug https://netbeans.org/bugzilla/show_bug.cgi?id=180499 filed due to above mentioned.
Comment 19 antonx 2010-02-09 09:43:05 UTC
(In reply to comment #13)
> 
> Are you sure you don't have any watches entered in watches view? (They can be
> harmful even if watches view is not displayed.)
> 

NO, absolutely NOT, but I am just thinking:

If I go with the mouse over a variable like $myvar
in the source, then NB will try to show me
the value of this variable in a hoover (? not sure how to call it)

But doing this, NB must analyse the value of the variable,
perhaps NB does internally the same than when displaying
the content of watch variables?


 
> Scanning your whole home dir is very weird and I doubt it's netbeans problem
> (nobody else has ever reported this) - don't you have it on include path
> (project properties)? 

the actual nb dev build modified my nb 6.8 project file and added a
test folder to parse which was:
 
 /home/user/Documents

(not /home/user/ as I told you)

I don't know what happened, perhaps some bug during importing old projects?

> > Conclusion: the problem is still here.
> > 

I will re-test tomorrow... because I still do not understand
that I could work with NB 6.8+ php 5.2.11 ..
Comment 20 Filip Zamboj 2010-02-09 10:31:13 UTC
(In reply to comment #19)
> (In reply to comment #13)
> > 
> > Are you sure you don't have any watches entered in watches view? (They can be
> > harmful even if watches view is not displayed.)
> > 
> 
> NO, absolutely NOT, but I am just thinking:
> 
> If I go with the mouse over a variable like $myvar
> in the source, then NB will try to show me
> the value of this variable in a hoover (? not sure how to call it)
> 
> But doing this, NB must analyse the value of the variable,
> perhaps NB does internally the same than when displaying
> the content of watch variables?
> 
YES, you're absolutely right. That's the same thing (sorry for not stating it clearly before). I'd recommend you to stop using both of this features. We are already thinking about disable by default until it's fixed in xdebug (enable optionally, of course)
> 
> > Scanning your whole home dir is very weird and I doubt it's netbeans problem
> > (nobody else has ever reported this) - don't you have it on include path
> > (project properties)? 
> 
> the actual nb dev build modified my nb 6.8 project file and added a
> test folder to parse which was:
> 
>  /home/user/Documents
> 
> (not /home/user/ as I told you)
> 
> I don't know what happened, perhaps some bug during importing old projects?

No idea, might happened. 

 
> > > Conclusion: the problem is still here.
> > > 
> 
> I will re-test tomorrow... because I still do not understand
> that I could work with NB 6.8+ php 5.2.11 ..

well, it's not about php version so much but about xdebug version. If you use php5.3 then you need to use latest xdebug (svn checkout or download latest beta2). If you are using php 5.2 then you are most probably safe. However, would be great if you add your comments (if any) about variables view related to xdebug/php version to https://netbeans.org/bugzilla/show_bug.cgi?id=180499. Thanks a lot for your cooperation so far and don't stop ;)
Comment 21 rmatous 2010-02-10 01:52:07 UTC
Reopening. Debugging php script -> SocketException reproducible

Until evaluated - keeping this issue open
Comment 22 antonx 2010-02-11 05:51:16 UTC
Created attachment 94078 [details]
xdebug.log + netbeans messages.log

Hi,

I did a new test with

 - netbeans-trunk-nightly-201002110200-php-linux.sh
 - Xdebug 2.1.0beta2

1. It stopped at a breakpoint
2. I saw local variables , good!
3. I could do quite a lot F8 steps ( which behaved like F7 step into)
4. I could hoover over variables:
   - object variables showed nothing
   - a variable containing a string showed the content
5. I continued with F8 steps
6. I tried again to hoover over a variable with 
   the mouse and I got the socket exception again

Cound you tell me the bug number from
http://bugs.xdebug.org
which tells that "eval -i" is buggy??
Comment 23 antonx 2010-02-11 06:06:06 UTC
Oh sorry, 

i fooled myself.

I tested again with netbeans 6.8

I send new files in some minutes.
Comment 24 antonx 2010-02-11 06:08:29 UTC
Created attachment 94079 [details]
logfiles for xdebug and netbeans messages.log

Log files for debugging with xdebug.

Here I have a new problem:

As soon as I try to do a step I get a:

  NullPointerException ....

so actually nothing works.
Comment 25 Filip Zamboj 2010-02-11 07:35:30 UTC
(In reply to comment #22)
> Created an attachment (id=94078) [details]
> xdebug.log + netbeans messages.log
> 
> Hi,
> 
> I did a new test with
> 
>  - netbeans-trunk-nightly-201002110200-php-linux.sh
>  - Xdebug 2.1.0beta2
> 
> 1. It stopped at a breakpoint
> 2. I saw local variables , good!
> 3. I could do quite a lot F8 steps ( which behaved like F7 step into)
> 4. I could hoover over variables:
>    - object variables showed nothing
>    - a variable containing a string showed the content
> 5. I continued with F8 steps
> 6. I tried again to hoover over a variable with 
>    the mouse and I got the socket exception again
> 
> Cound you tell me the bug number from
> http://bugs.xdebug.org
> which tells that "eval -i" is buggy??

eval -i id from our log. The problem is wrong answer from xdebug. 
I'd say it's this one http://bugs.xdebug.org/view.php?id=313, but not really sure at the moment. Resolution is not fixable.
Comment 26 Filip Zamboj 2010-02-11 07:42:22 UTC
(In reply to comment #24)
> Created an attachment (id=94079) [details]
> logfiles for xdebug and netbeans messages.log
> 
> Log files for debugging with xdebug.
> 
> Here I have a new problem:
> 
> As soon as I try to do a step I get a:
> 
>   NullPointerException ....
> 
> so actually nothing works.

well :( .. anyway, we found out there is a problem with socket exception still ... I didn't reproduce NullPointerExc. Did you file it? COuld you add report number here, please? thanks.
Comment 27 antonx 2010-02-12 03:45:17 UTC
(In reply to comment #26)
> (In reply to comment #24)

> > As soon as I try to do a step I get a:
> > 
> >   NullPointerException ....
> > 
> > so actually nothing works.
> 
> well :( .. anyway, we found out there is a problem with socket exception still
> ... I didn't reproduce NullPointerExc. Did you file it? COuld you add report
> number here, please? thanks.

Hi I didn't open a new bug for this.

I did already file the logfiles in the last attachement:
"logfiles for xdebug and netbeans messages.log"

or as link: 
https://netbeans.org/bugzilla/attachment.cgi?id=94079
Comment 28 antonx 2010-02-16 04:39:36 UTC
I added a new bug:

https://netbeans.org/bugzilla/show_bug.cgi?id=180768

unfortunately the actual dev build is unusable for debugging.
Comment 29 Filip Zamboj 2010-02-16 07:39:12 UTC
this has already been fixed by radek:
http://hg.netbeans.org/web-main/rev/e71c5b5cf4ab
http://hg.netbeans.org/web-main/rev/72fc31a44e21

reopened because of https://netbeans.org/bugzilla/show_bug.cgi?id=180768 that has been fixed as well. 

=> closing as resolved fixed. 

@reporter: can you verify that you don't face this problem anymore? thanks.
Comment 30 antonx 2010-02-17 01:15:19 UTC
Do I need a dev build or can I test with netbeans 6.9 milestone 1??

(In reply to comment #29)
> this has already been fixed by radek:
> http://hg.netbeans.org/web-main/rev/e71c5b5cf4ab
> http://hg.netbeans.org/web-main/rev/72fc31a44e21
> 
> reopened because of https://netbeans.org/bugzilla/show_bug.cgi?id=180768 that
> has been fixed as well. 
> 
> => closing as resolved fixed. 
> 
> @reporter: can you verify that you don't face this problem anymore? thanks.
Comment 31 antonx 2010-02-17 01:37:09 UTC
Tested it with

netbeans-trunk-nightly-201002170200-php-linux.sh

I didnt get the nullpointer exception :-)

(In reply to comment #30)
> Do I need a dev build or can I test with netbeans 6.9 milestone 1??
> 
> (In reply to comment #29)
> > this has already been fixed by radek:
> > http://hg.netbeans.org/web-main/rev/e71c5b5cf4ab
> > http://hg.netbeans.org/web-main/rev/72fc31a44e21
> > 
> > reopened because of https://netbeans.org/bugzilla/show_bug.cgi?id=180768 that
> > has been fixed as well. 
> > 
> > => closing as resolved fixed. 
> > 
> > @reporter: can you verify that you don't face this problem anymore? thanks.
Comment 32 antonx 2010-02-17 01:46:10 UTC
Sorry I was too fast (or better in the wrong bug issue)

Testet with

netbeans-trunk-nightly-201002170200-php-linux.sh

I did not get a nullpointer exception, OK ;-)

But if I go with the mouse over a variable in my
php sources during debugging, sometimes
I see the value of the variable in a hoover,
and othertimes I get the

 "Socket Exception.."

so I reopen this bug.

( even if xdebug does things strangely, we never should get an exception,
or at least the error message should say something like:
I stopped debugging because I got "abc" from xdebug, or something
we could use to tell the xdebug guys whats wrong).

Please note: 
I filed the same bug on the xdebug

http://bugs.xdebug.org/view.php?id=530

perhaps you should discuss directly with Derick?

Actualy we have the problem:

netbeans guys says its xdebug bug
xdebug guys says its netbeans

Result it does not work and will perhaps never work 
(which I do not hope since both a great tools)
Comment 33 antonx 2010-02-17 02:18:11 UTC
Created attachment 94219 [details]
the logfiles from netbeans and xdebug + the index.php file

I just did e test with the following code
and netbeans-trunk-nightly-201002170200-php-linux.sh:

    class MyClass {
         
         private $a = "b";
         private $b = null;
         
         public function __construct() {
            $this->b = 'b';
            $c = 'a' . 'b';
         }
         // I hoover in nb over this $a
         public function test($a) {
            echo "a ist: " . $a;
         }
      }
      
      $a = 1;
      $b = 2;
      $c = new MyClass();
      $f = 3;
      $c->test('gogo'); // this call***
      $c->test('gogo');

and when I am inside the function $c->test($a)
and I hoover over the parameter $a in netbeans I get a socket exception.

I put all the files in the next attachment.

NOTE: I saved all logfiles as soon as I got the socket exception 
(I did not stop debugging in netbeans or close netbeans)
Comment 34 rmatous 2010-02-17 02:38:53 UTC
thanks, we'll re-evaluate with xdebug 2.0.5 on your test case
Comment 35 antonx 2010-02-17 04:20:20 UTC
Ateention: I did all tests now with 

  ** xdebug 2.1.0beta2 **

(using the PEAR installer)

I modifies the title of this bug too,
you don't need to test 2.0.5


(In reply to comment #34)
> thanks, we'll re-evaluate with xdebug 2.0.5 on your test case
Comment 36 Filip Zamboj 2010-02-17 06:10:57 UTC
(In reply to comment #35)
> Ateention: I did all tests now with 
> 
>   ** xdebug 2.1.0beta2 **
> 
> (using the PEAR installer)
> 
> I modifies the title of this bug too,
> you don't need to test 2.0.5
> 
> 
> (In reply to comment #34)
> > thanks, we'll re-evaluate with xdebug 2.0.5 on your test case

(In reply to comment #33)
> Created an attachment (id=94219) [details]
> the logfiles from netbeans and xdebug + the index.php file
> 
> I just did e test with the following code
> and netbeans-trunk-nightly-201002170200-php-linux.sh:
> 
>     class MyClass {
> 
>          private $a = "b";
>          private $b = null;
> 
>          public function __construct() {
>             $this->b = 'b';
>             $c = 'a' . 'b';
>          }
>          // I hoover in nb over this $a
>          public function test($a) {
>             echo "a ist: " . $a;
>          }
>       }
> 
>       $a = 1;
>       $b = 2;
>       $c = new MyClass();
>       $f = 3;
>       $c->test('gogo'); // this call***
>       $c->test('gogo');
> 
> and when I am inside the function $c->test($a)
> and I hoover over the parameter $a in netbeans I get a socket exception.
> 
> I put all the files in the next attachment.
> 
> NOTE: I saved all logfiles as soon as I got the socket exception 
> (I did not stop debugging in netbeans or close netbeans)

does it mean that you stopped in this function on line with echo ".." and hovered over $a so the variable was known in context?  
          public function test($a) {
             echo "a ist: " . $a;
          }
Comment 37 antonx 2010-02-17 07:46:35 UTC
> does it mean that you stopped in this function on line with echo ".." and
> hovered over $a so the variable was known in context?  
>           public function test($a) {
>              echo "a ist: " . $a;
>           }

No I hoovered over the $a in

  public function test($a) {
Comment 38 devarni 2010-02-18 02:18:22 UTC
Same problem here. Nullpointer exception, socket error.. The complete thing seems to be broken. Not only debugging, there also some exceptions with code hinting (Bug report always send).
Comment 39 Filip Zamboj 2010-02-18 02:38:02 UTC
(In reply to comment #38)
> Same problem here. Nullpointer exception, socket error.. The complete thing
> seems to be broken. Not only debugging, there also some exceptions with code
> hinting (Bug report always send).

Null pointer is another bug. It's already resolved. 
see http://netbeans.org/bugzilla/show_bug.cgi?id=180768
Comment 40 Filip Zamboj 2010-02-18 03:12:55 UTC
reproduced on 
Product Version: NetBeans IDE Dev (Build 2010-02-18_09-04-18 )
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01

socket exception is thrown whenever evaluation is invoked (hover over vars or watches) even if variable is known in context.
Comment 41 Filip Zamboj 2010-02-18 03:43:12 UTC
Created attachment 94278 [details]
messages log
Comment 42 Filip Zamboj 2010-02-18 03:44:26 UTC
Created attachment 94279 [details]
xdebug log
Comment 43 derickr 2010-02-20 16:05:21 UTC
I just had a look at this with the latest SVN version of Xdebug and the latest released version of netbeans (6.8) with all possible updates and I see the following happening with the reproduce case in comment #34 (http://netbeans.org/bugzilla/show_bug.cgi?id=180252#c34):


- With the variables panes *not* selected:

  - I can easily step to the indicated point (in the test() function).
  - If I hover over "$a" then the following command is sent:

    <- eval -i 10919 -- JGI="

  - Netbeans starts using a lot of CPU and memory until:
  - Xdebug replies with:

    -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="10920"><property address="140735924682416" type="string" size="4" encoding="base64"><![CDATA[Z29nbw==]]></property></response>

- If the variables page is selected, netbeans starts doing this:

<- property_get -i 10921 -n $this -c 0 -p 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="property_get" transaction_id="10921"><property name="$this" fullname="$this" address="49161064" type="object" classname="MyClass" children="1" numchildren="2" page="1" pagesize="31"><property name="CLASSNAME" type="string"><![CDATA[MyClass]]></property><property name="a" fullname="$this-&gt;a" facet="private" address="49154176" type="string" size="1" encoding="base64"><![CDATA[Yg==]]></property><property name="b" fullname="$this-&gt;b" facet="private" address="49161344" type="string" size="1" encoding="base64"><![CDATA[Yg==]]></property></property></response>

<- property_get -i 10922 -n $this -c 0 -p 2
-> <response ...

<- property_get -i 10923 -n $this -c 0 -p 3
-> <response ...

(and it continues increasing the page number until you deselect the variables page).
Obviously netbeans should try to ask for more pages than there are elements for—unfortunately the protocol doesn't specify that it should throw an error then, but I will change Xdebug to not return any properties. I've opened a new bug for this: http://netbeans.org/bugzilla/show_bug.cgi?id=180999
Comment 44 Filip Zamboj 2010-02-22 08:06:35 UTC
I'd say this is fixed with http://netbeans.org/bugzilla/show_bug.cgi?id=179533
Comment 45 Filip Zamboj 2010-02-22 08:06:53 UTC
verified 
Product Version: NetBeans IDE Dev (Build 2010-02-22_15-04-22 )
Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01
Comment 46 rmatous 2010-02-22 08:37:03 UTC
*** Bug 178816 has been marked as a duplicate of this bug. ***
Comment 47 ajinkya 2010-02-22 12:00:56 UTC
Created attachment 94394 [details]
Program counter highlight bug
Comment 48 ajinkya 2010-02-22 12:02:18 UTC
This time I can see the local variables in Netbeans Variable pane and I can debug successfully. However if I move mouse over any variable I still get the same error.

I am using PHP Version 5.3.1 with  Xdebug v2.1.0beta2-dev on Windows 7 64bit. My php build is NetBeans-dev-2010-02-22_18-04-20 -php.zip


Another small bug is , after socket exception error, the Green program counter (with row highlighted) remains there even after the new debugging session is launched. See the previously attached image.
Comment 49 rmatous 2010-02-22 12:29:40 UTC
Looks like minority issue "Green program counter" after SocketException which is  serious issue, so can you attach log (see http://wiki.netbeans.org/HowToConfigureXDebug#Enable_Xdebug_logging) to know a little bit more about where the problem could be
Comment 50 rmatous 2010-02-22 12:54:32 UTC
to antonx:

please could you let me know if this problem is still reproducible for you (with/on 2.1.0beta2 on opensuse 11.1 64bit)
Comment 51 Filip Zamboj 2010-02-22 16:30:41 UTC
well, gyus

debugger is behaving weird with older xdebug, that's true. However, there well some bugs fixed in netbeans and some work done in xdebug by Derrick. 

so, with xdebug 2.0.5 I had some troubles. That means I reproduced exception. But no troubles with 2.1.0beta3-dev(checked out today). 

@antonx: could you confirm your current xdebug version and build if it works for you? Otherwise, just add some comment what's wrong, please. 

Thanks a lot.
Comment 52 Filip Zamboj 2010-02-22 16:33:22 UTC
(In reply to comment #49)
> Looks like minority issue "Green program counter" after SocketException which
> is  serious issue, so can you attach log (see
> http://wiki.netbeans.org/HowToConfigureXDebug#Enable_Xdebug_logging) to know a
> little bit more about where the problem could be

Radek, I didn't file a bug with the green line not disappearing because it was reproducible after SocketException only. I've never reproduce otherwise.
Comment 53 rmatous 2010-02-23 02:02:42 UTC
> Radek, I didn't file a bug with the green line not disappearing because it was
> reproducible after SocketException only. I've never reproduce otherwise.

Yes, I know. Anyway will be fixed, but priority low

Filipe, please could you try debugging with:
- Xdebug v2.1.0beta2-dev on Windows 7 64bit
- NetBeans-dev-2010-02-22_18-04-20 -php.zip
Comment 54 antonx 2010-02-23 03:38:42 UTC
Hi,

I just built xdebug revision 3223, and debugged
a little, unfortunately my apache uses 
at some point 100% cpu and my system is unusable.

I wait until I can install the next official xdebug py pecl and retest then.


(In reply to comment #51)
> well, gyus
> 
> debugger is behaving weird with older xdebug, that's true. However, there well
> some bugs fixed in netbeans and some work done in xdebug by Derrick. 
> 
> so, with xdebug 2.0.5 I had some troubles. That means I reproduced exception.
> But no troubles with 2.1.0beta3-dev(checked out today). 
> 
> @antonx: could you confirm your current xdebug version and build if it works
> for you? Otherwise, just add some comment what's wrong, please. 
> 
> Thanks a lot.
Comment 55 Filip Zamboj 2010-02-23 06:53:20 UTC
works with 
Product Version: NetBeans IDE Dev (Build 2010-02-23_09-04-15 )
Java: 1.6.0_16; Java HotSpot(TM) Client VM 14.2-b01
PHP 5.3.1 (cli) (built: Nov 19 2009 09:49:51)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
    with Xdebug v2.1.0beta2-dev, Copyright (c) 2002-2010, by Derick Rethans

I'll wait for antonx's confirmation. 

ajinkya@netbeans.org: could you provide exact steps and attach messages log (eventually xdebug log as well; xdebug.remote_log=<path to writable folder>). We need to know from which place is the exception thrown. see http://wiki.netbeans.org/HowToConfigureXDebug#Enable_Xdebug_logging to enable debugger logging. 

Thanks a lot.
Comment 56 ajinkya 2010-02-23 12:01:11 UTC
Created attachment 94428 [details]
xDebug log (win7 64bit, php 5.3.1)

This is the xDebug log for reproducible socket exception error.  Here I am stepping through Drupal. Sometimes I can move mouse and see the value of variable and sometimes it throws error.

I will attach the netbeans log file in the next message.
Comment 57 ajinkya 2010-02-23 12:05:45 UTC
Created attachment 94429 [details]
netbeans' log (win7 64bit, php 5.3.1)

Error can be reproduced if you step through Drupal code and move mouse over variable.

My guess is that this exception should be thrown with any php code. Also it happens when variable's value is not set and you move mouse over it.
Comment 58 ajinkya 2010-02-23 12:15:20 UTC
Created attachment 94430 [details]
screen shot (win7 64bit, php 5.3.1)

I am just attaching a screenshot to show exact when socket exception is thrown.

When ever I move mouse over $args variable, the exception is thrown.

Note: $args is not null
Comment 59 rmatous 2010-02-23 12:26:46 UTC
Will be investigated more deeply, but according to xdebug.log it looks like xdebug sends no response after eval command. So, bug in xdebug? Derick, please can you comment?
Comment 60 Tomas Mysik 2010-02-24 02:39:57 UTC
Created attachment 94459 [details]
xdebug log

Reproducible for me, xdebug log attached.

Xdebug v2.1.0beta3-dev, Copyright (c) 2002-2010, by Derick Rethans
Comment 61 antonx 2010-03-01 05:42:53 UTC
Created attachment 94621 [details]
xdebug.log and messages

I just did the tests with 
- netbeans-trunk-nightly-201003010200-php-linux.sh
- xdebug 2.1.0beta3 (installed from pecl)

What I do:
- I step (debug) through my index.php file
- I hoover over a variable
- After the next F7 or F8 step I get the socket exception

NOTE: It seems that F7 and F8 are equel, or to be more precise
   the F8 key behave like F7 (jump into).
Comment 62 Filip Zamboj 2010-03-01 06:21:10 UTC
reassigning back to rmatous. 

@antonx: if you will fix this then reassign back to yourself ;). thanks.
Comment 63 antonx 2010-03-02 04:03:27 UTC
(In reply to comment #62)
> reassigning back to rmatous. 
> 
> @antonx: if you will fix this then reassign back to yourself ;). thanks.

Sorry, i am not a nb developper ... I am only a stupid bug reporter ;-)

This means that i am not fixing it.
Comment 64 antonx 2010-03-15 09:09:34 UTC
Hi,

I just wanted to ask ... are there any news ???

xdebug still does not work (from time to time I do a 
test with a dev build)


(In reply to comment #63)
> (In reply to comment #62)
> > reassigning back to rmatous. 
> > 
> > @antonx: if you will fix this then reassign back to yourself ;). thanks.
> 
> Sorry, i am not a nb developper ... I am only a stupid bug reporter ;-)
> 
> This means that i am not fixing it.

(In reply to comment #62)
> reassigning back to rmatous. 
> 
> @antonx: if you will fix this then reassign back to yourself ;). thanks.
Comment 65 berniev 2010-03-22 16:55:40 UTC
In case anyone missed it:

from http://bugs.xdebug.org/view.php?id=530 (Mar 21 2010)

"I've just tested this with the latest Xdebug (SVN) and the latest netbeans (the 20100321 nightly) and it works just fine. However, netbeans seems to be starting to use a bit more memory once in a while when eval is used. This is however something on the netbeans side. I am closing this issue as it's working fine, but netbeans really should not be using eval here, but instead property_get with the correct stack depth."
Comment 66 berniev 2010-03-22 18:04:28 UTC
I have just retested with latest NB (201003220200) with xdebug 2.1.0beta3, php 5.3.1 (xampp 1.73a) on Ubuntu 9.10 and can confirm the following:

1) With "Watches and Balloon Evaluation" disabled in NB PHP options (default setting) breakpoint at first line and subsequent stepping through code works well.

2) Hover over variable in code does still display variable value (!).

3) Step OVER does not behave as expected, it behaves same as step INTO.

4) setting a watch does not cause any immediate problems. Not tested extensively as I moved to the following step.

5) Enabling "Watches and Balloon Evaluation" very quickly used nearly all available memory (1GB) and swap file (1.3GB) and produced constant disc activity, almost freezing the pc. The browser (firefox 3.5.8) hung needing a force quit. It took a while to get NB shut down.
Comment 67 Filip Zamboj 2010-03-23 13:47:05 UTC
(In reply to comment #66)
> I have just retested with latest NB (201003220200) with xdebug 2.1.0beta3, php
> 5.3.1 (xampp 1.73a) on Ubuntu 9.10 and can confirm the following:
> 
> 1) With "Watches and Balloon Evaluation" disabled in NB PHP options (default
> setting) breakpoint at first line and subsequent stepping through code works
> well.
> 
> 2) Hover over variable in code does still display variable value (!).
> 
> 3) Step OVER does not behave as expected, it behaves same as step INTO.

would you point me a bit to place where it happens to you? I can't reproduce this one. 

> 4) setting a watch does not cause any immediate problems. Not tested
> extensively as I moved to the following step.
> 
> 5) Enabling "Watches and Balloon Evaluation" very quickly used nearly all
> available memory (1GB) and swap file (1.3GB) and produced constant disc
> activity, almost freezing the pc. The browser (firefox 3.5.8) hung needing a
> force quit. It took a while to get NB shut down.

did you have xdebug logging enabled at this point?
Comment 68 Filip Zamboj 2010-03-23 16:18:55 UTC
I reproduced extensive memory usage issue. 

step into works as step over: not reproduced. file a separate bug if you reproduce and some example where this is reproducible, please. 

extensive memory usage: bug 182594
Comment 69 Filip Zamboj 2010-03-23 16:21:45 UTC
(In reply to comment #68)
> I reproduced extensive memory usage issue. 
> 
> step into works as step over: not reproduced. file a separate bug if you
> reproduce and some example where this is reproducible, please. 
sorry I write it the other way around. step over works like step into: not reproduced
> extensive memory usage: bug 182594
Comment 70 berniev 2010-03-23 22:31:26 UTC
Re Step INTO and Step OVER:

I'll reverse my comment that they are the same.

BUT, I now understand why I thought so. Having used different debuggers over (too) many years I'm expecting a third type of step; being to skip execution of a line - or, step without executing.

So I expect:
1) Step > execute current statement and stop at statement immediately following current source statement.
2) Step Into > execute current statement and stop at next execution statement.
3) Step Over > do not execute current source statement (skip) and stop at next source statement.

Netbeans appears to lack the third of these, and the semantics have thrown me. Maybe earlier poster had the same expectation.

Re memory usage: Thanks for confirming, maybe at last we're getting closer to having debug resolved. It's been some months now - ever since I started using NB!
Comment 71 rmatous 2010-03-24 13:59:43 UTC
http://hg.netbeans.org/web-main/rev/6458c0e2824e

summary:
- Watches and Balloon Evaluation disabled as default
- hovering over variable should still work (hopefully shouldn't crash)


Hovering over variable calls "property_get" instead  of "eval" command now.
Selection still sends "eval" command, but as default disabled.
Watches as default disabled. 

Affects issues:
https://netbeans.org/bugzilla/show_bug.cgi?id=182594
https://netbeans.org/bugzilla/show_bug.cgi?id=181186
https://netbeans.org/bugzilla/show_bug.cgi?id=180252

Related to(xdebug issue):
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000313

Please test and comment, verify, reopen
Comment 72 Quality Engineering 2010-03-25 05:57:24 UTC
Integrated into 'main-golden', will be available in build *201003250201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/6458c0e2824e
User: Radek Matous <rmatous@netbeans.org>
Log: #182594  -  extensive memory usage while debugging
#181186  -  Watches and Balloon Evaluation
#180252  -  Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug 2.0.5/2.1.0beta2 on opensuse 11.1 64bit
Comment 73 antonx 2010-03-25 11:36:16 UTC
Looks good on a first test.

(after stopping and restarting i got again a socket exception ...
but I don not remember how to reproduce it)

Could you backport the fixes to nb 6.8???

If possible :-)

(In reply to comment #72)
> Integrated into 'main-golden', will be available in build *201003250201* on
> http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
> Changeset: http://hg.netbeans.org/main/rev/6458c0e2824e
> User: Radek Matous <rmatous@netbeans.org>
> Log: #182594  -  extensive memory usage while debugging
> #181186  -  Watches and Balloon Evaluation
> #180252  -  Socket Exception occoured Error with php 5.3.1+NB 6.8+xdebug
> 2.0.5/2.1.0beta2 on opensuse 11.1 64bit
Comment 74 rmatous 2010-03-25 13:23:44 UTC
Not possible to backport this fix into 6.8.

I didn't find any bug in NB code base, but rather used recommended workaround to send command property_get instead of eval. On the other hand property_get can't be used for evaluation of arbitrary expressions.

Whatever SocketException report is welcome, especially  if followed by xdebug.log, but please rather open new issue (maybe containing notice or link to this one). 


thanks for your help, patience
Comment 75 Filip Zamboj 2010-03-25 13:52:03 UTC
so I consider this one as verified. I can't so far and if somebody does then open new issue, as Radek mentioned in previous comment, please. 

v/c
Comment 76 antonx 2010-03-26 14:00:03 UTC
Hi I will add new issue,
 I am in hurry and I dont want to forget, so a file a comment here first.

Its simple: 
- make a breakpoint as indicated as comment
- step through this file with F7
- it crashes with socket exception where the comment says it

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
      <title></title>
   </head>
   <body>
      <?php

      class MyClass {
         
         private $a = "b";
         private $b = null;
         
         public function __construct() {
            $this->b = 'b'; // here it crashes
            $c = 'a' . 'b';
         }
         
         public function test($a) {
            echo "a ist: " . $a;
         }
      }
      // step through with F7
      $a = 1; // breakpoint here
      $b = 2;
      $c = new MyClass();
      $f = 3;
      $c->test('gogo');
      $c->test('gogo');
      ?>
   </body>
</html>
Comment 77 Filip Zamboj 2010-03-26 14:14:11 UTC
Hey anton, I can't verify ... are you sure you have newest build available? thanks.
Comment 78 marekr 2010-03-26 15:13:52 UTC
I'm still experiencing this socket exception problem (but I don't have the latest xdebug from svn, so the bug might be fixed). 
Where did you get the latest xdebug binary, compiled yourself?
Comment 79 Filip Zamboj 2010-03-26 15:20:29 UTC
see 
http://wiki.netbeans.org/HowToConfigureXDebug#How_to_build_Xdebug_.28useful_for_php5.3.29

if you're running windows then just download xdebug latest beta. 

latest netbeans build: 
http://bertram.netbeans.org/hudson/job/PHP-Build/?
Comment 80 marekr 2010-03-26 15:41:28 UTC
(In reply to comment #79)
> see 
> http://wiki.netbeans.org/HowToConfigureXDebug#How_to_build_Xdebug_.28useful_for_php5.3.29
> 
> if you're running windows then just download xdebug latest beta. 
> 
> latest netbeans build: 
> http://bertram.netbeans.org/hudson/job/PHP-Build/?
I have the latest NB php build from Hudson (NetBeans-dev-2010-03-26_15-03-42 -php.zip) and as for the Xdebug, phpinfo says "2.1.0rc1-dev", downloaded from here http://xdebug.org/files/xdebug-latest.tgz (filename: php_xdebug-2.1dev-5.3-vc9.dll), but the same error applies for this one http://xdebug.org/files/php_xdebug-2.1.0beta3-5.3-vc9.dll too.
Comment 81 Filip Zamboj 2010-03-26 15:52:39 UTC
(In reply to comment #80)
> (In reply to comment #79)
> > see 
> > http://wiki.netbeans.org/HowToConfigureXDebug#How_to_build_Xdebug_.28useful_for_php5.3.29
> > 
> > if you're running windows then just download xdebug latest beta. 
> > 
> > latest netbeans build: 
> > http://bertram.netbeans.org/hudson/job/PHP-Build/?
> I have the latest NB php build from Hudson (NetBeans-dev-2010-03-26_15-03-42
> -php.zip) and as for the Xdebug, phpinfo says "2.1.0rc1-dev", downloaded from
> here http://xdebug.org/files/xdebug-latest.tgz (filename:
> php_xdebug-2.1dev-5.3-vc9.dll), but the same error applies for this one
> http://xdebug.org/files/php_xdebug-2.1.0beta3-5.3-vc9.dll too.

If this means you reproduced the exception then enter new issue, please. Add steps how to reproduce. Run netbeans with -J-Dorg.netbeans.modules.php.dbgp.level=400 and add 
messages.log from <userdir>/var/log 

enable xdebug log in your php.ini using xdebug.remote_log=/log_path/xdebug.log and add 
xdebug.log that you can create by enabling directive 

thanks a lot.
Comment 82 marekr 2010-03-26 15:56:27 UTC
Ok, this looks like it's not a NB bug.
I just tried Notepad++ plugin DBGp and it's doing the same thing.
Comment 83 antonx 2010-03-29 12:13:49 UTC
Hi Filip,

I just retested it some minutes ago still the same procedure ;-)

I opened a new bug report as wanted and added all log files.

The bug hunt continues at:

http://netbeans.org/bugzilla/show_bug.cgi?id=183064

(In reply to comment #77)
> Hey anton, I can't verify ... are you sure you have newest build available?
> thanks.
Comment 84 rmatous 2010-04-12 09:43:06 UTC
*** Bug 167447 has been marked as a duplicate of this bug. ***
Comment 85 brijal.savaliya 2013-07-02 13:04:18 UTC
I have configured xdebug with Netbeans, simple script is running perfectly but when i debug codigniter code i will get error like 

I receive a "Socket
Exception" dialogue box that says:

Socket Exception
Socket Exception occured
If you have any Watches, try to remove them and restart the debugger. If
removing Watches doesn't help or you don't have any Watches, please file an
issue and provide the exact steps to reproduce your problem. Please attach the
IDE log. Attaaching your project would also be very helpful.


i have configured my netbeans following .. 

X Debug with NetBeans : 
1_Follow Instruction https://github.com/derickr/xdebug/blob/master/README
in php.ini set 
[xdebug]
xdebug.remote_enable=1
xdebug.remote_port=9001
xdebug.idekey="netbeans-xdebug"

2) Start Netbeans IDE. Goto Tools >> Options >> PHP >> General: and check for settings in Debugging section. By default the port should be 9000 and Session-ID ‘netbeans-xdebug’.

3) go to the config.php file under /application/config and change the following values:

$config['uri_protocol'] = "PATH_INFO";
$config['enable_query_strings'] = TRUE; 

4) Let’s say, You have installed a ‘test’ CodeIgniter application in your web server. Now add that application as a project in Netbeans 6.8 . Goto Project properties by right clicking on the project ‘test’.  Now go to ‘Run Configuration’ and click ‘advanced’  select ‘Ask Every time’ in Debug URL.

5) Now Open your ‘welcome’ controller and press ‘Ctrl+F5' which will request for the URL:

6) f4 - next break point
f7 - debug line by line (for flow whole project, use this )
f8 - debug line by line (for flow whole project, use this )

ref sites :
1) https://netbeans.org/kb/docs/php/debugging.html
- for setting netbeans and use debug tool for netbeans

2) http://tohin.wordpress.com/2010/02/12/debugging-codeigniter-project-using-xdebug-and-netbeans/

can anyone help me out for this problem .. ???
Comment 86 Jackie_Rosen 2014-02-16 11:24:47 UTC
SPAM - Removed by Administrator


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo