debugging and instance variables

Hello!

At the moment I'm testing the possibilities of debugging in PhpStorm.
For this I use an example.


--------------------------------
class documentor{

    private $_variable;

    public function setzeVariable($parameter, $testArray) {

        $parameter += 6;

        $this->_variable = $parameter;

        $parameter = $this->test1($parameter);

        return $parameter;
    }

    public function test1($parameter){

        $parameter += 7;
        $this->_variable = $parameter;
        $parameter = $this->test2($parameter);

        return $parameter;
    }

    private function test2($parameter){

        $parameter += 8;
        $this->_variable = $parameter;

        return $parameter;
    }

}

$testArray = array('4','5','6');
$docu = new documentor();
$parameter = $docu->setzeVariable(5, $testArray);

-----------------------------------

In PhpStorm I have the windows 'frames', 'Variable' and 'Watches'
opened.


When I use the windows 'frames' in the method 'test2', then go
are the variables
$ parameter = 26
and
$ this-> _variable = 26


debug1.jpg
When I use the windows 'frames' to the method
test2 go, then the variables are in the window
'Watches' empty.

debug2.jpg
Can you see the contents of variables of previous methods?


Sorry for my bad english.

Yours sincerely,

Stephan

Please sign in to leave a comment.