NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[fixed] Problem with set_error_handler & Debug step by s


Joined: 28 May 2007
Posts: 7
Reply with quote
Hi,

First of all thanks to Dmitri and Nusphere fot his great product.

I would like to point this problem that could be a bug

This was noticed using PHPEd v5.0.5023 and DBG v3.1.10

Code:

error_reporting(E_ALL);

function myERR($errno, $errmsg, $filename, $linenum, $vars) {
  echo "$errno, $errmsg, $filename, $linenum, $vars";
} # myERR

$old_error_handler1 = set_error_handler("myERR");
$old_error_handler2 = set_error_handler("myERR");

trigger_error("Test", E_USER_NOTICE);

echo $old_error_handler1;
echo $old_error_handler2;


If I run the code with Run in the Debugger (F9 default key), I'll have
$old_error_handler1 = NULL (right)
$old_error_handler2 = MyERR (right)

If I run the code with Step Over (F8 default key), I'll have
$old_error_handler1 = NULL (right)
$old_error_handler2 = NULL (error)


This is really annonyng because this screw up my user-defined error handler if I use Step debug
With PHPEd v4.0 it works right.

I'm available for further info.

Thanks, bye.
View user's profileFind all posts by adm.admSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
Quote:
PHPEd v5.0.5023 and DBG v3.1.10

5023 comes with DBG 3.1.12.
Would you please double check version number you work with?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 28 May 2007
Posts: 7
Reply with quote
I double checked

I download PHPEd on 2007-05-24 and I got build 5023
The exe was NuSphere-phped-5.0evl-Win32.exe 57.448.353 byte

It installed DbgListener.exe of 1.400.832 byte v3.1.10.0

Apart for this do you known the problem I wrote?
Do you think that it is solved with v3.1.12?
If so, may you give a link to download?

Thanks very much.
View user's profileFind all posts by adm.admSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I mean version of the debugger module that's running on the server. Please check with phpinfo().

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 28 May 2007
Posts: 7
Reply with quote
Ok, triple check.

phpinfo result:
dbg
DBG php debugger, version 3.1.12, Copyright 2001, 2007 Dmitri Dmitrienko, http://www.nusphere.com/dbg

Would we focus on the problem?
View user's profileFind all posts by adm.admSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
as a possible workaround, would you put those calls to set_error_handler() into a separated procedure and not step over them?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 28 May 2007
Posts: 7
Reply with quote
Ok, this is an easy workaround, I'll do it.

Thanks for your support.
View user's profileFind all posts by adm.admSend private message


Joined: 28 May 2007
Posts: 7
Reply with quote
Hi Dmitri,

I'm still having problems with debugger and set_error_handler

I have PHP Version 5.2.1, DBG php debugger version 3.1.12, PHPED v5.0.5025 (Professional)

I try to explain the problem usign this schema:

Line 10: some code
Line 20: set_error_handler('my_error_handler')
Line 30: some code
Line 40: trigger_error('my_notice', E_USER_NOTICE);
Line 50: some code

Case 1
I put breakpoint at line 50 , I use F9 to go from 0 to 50.
If I have a breakpoint after line 40 my_error_handler is called and works ok only when php is at line 40,
every succesive call doesn't trigger my_error_handler, I see errors only with the Errors windows of the IDE.

Case 2
I put breakpoints at lines 30 and 50 , I use F9 to go from 30 to 50.
If I have a breakpoint before line 40, my_error_handler is never called,
I can see error only within the Errors window of the IDE.


I'm developing a framework for my company and I need to have a custom error handler so I can't remove this function.
Any Idea to solve the matter?

Thanks for support.
View user's profileFind all posts by adm.admSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
This problem is fixed in dbg 3.2.1 that will come with next build of PhpED, namely 5026.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
[fixed] Problem with set_error_handler & Debug step by s
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic