NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
DBG & PHP 5.0.2 comatible?


Joined: 02 Oct 2004
Posts: 2
Reply with quote
I recently reinstalled my web-development applications.
I installed PHP 5.0.2 and DBG 2.11.30 with it's listener.
phpinfo() returns following
Version 2.11.30
Linked as a shared library.
Profiler compiled, enabled
debugger.enable_session_cookie On On
debugger.enabled On On
debugger.fail_silently Off Off
debugger.ignore_nops Off Off
debugger.JIT_enabled Off Off
debugger.JIT_host clienthost clienthost
debugger.JIT_level 3 3
debugger.JIT_port 7869 7869
debugger.profiler_enabled On On
debugger.session_nocache On On
debugger.timeout_seconds 300 300

I use PHP Expert Editor for debug and have following problem:
With some sources debugger just continue running while I told it do only one step. I found one pice of such code. Here it is.
It consits of 2 files as it seems that problem is with __autoload() function
File1: class.rtfParser.php
Code:

<?php
final class rtfParser {
   private $keywords = array ();
   private $state = NULL;

   public function __construct () {
      $this->keywords = array ();
      $this->state = new rtfState ($this);
   }
}

function __autoload ($class) {
   require_once 'class.' . $class . '.php';
   return false;
}

$rtf = new rtfParser ();

echo 'OK!';

?>


File2: class.rtfState.php
Code:

<?php
final class rtfState {
   public function __construct () {
      //void
   }
}

?>

Starting debugger and doing 'step into' all time results in stop debugging after entering into rtfPaser::__construct()

Is this a known problem or problem of PHP Expert Editor's debugger?
View user's profileFind all posts by ProficSend private message


Joined: 02 Oct 2004
Posts: 2
Reply with quote
More games with this code shows that problem is with passing $this to object's constructor inside constructor.
E.g. with this rtfParser::__construct()
Code:

public function __construct () {
   $this->keywords = array ();
   $this->state = new stdClass ($this);
}

problem exists, while with this
Code:

public function __construct () {
   $this->keywords = array ();
   $this->state = new stdClass ();
}

does not.
View user's profileFind all posts by ProficSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
I tried dbg shipped with phped and didn't encounter any problems. It steps through your code pretty well but under php 5.0.1. Try it out with 5.0.2 and let me know. Should work too.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
DBG & PHP 5.0.2 comatible?
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