Menu

Debugger: Evaluate Variables

Jürgen
2006-02-15
2012-12-07
  • Jürgen

    Jürgen - 2006-02-15

    I have still problems with the debugger.
    So I tried to test this with the xdebuger client:

    I testet it with this command:
    property_get -n "$a" -i 9
    and get a valid answer "1" in the response string
    ( please send me a email for sending a hardcopy of the console output)

    I hope this helps You to get the debugging working.
    Feel free to contact me for further informations and tests.

    with kind regards
    Jürgen

     
    • Pierre Fauconnier

      For the moment i can't help on xDebug.
      This could come from some compiling options of PHP...
      Could you please send some code snippets (and expected results) ?

      Thank you for your report,
      Pierre.

       
    • Jürgen

      Jürgen - 2006-02-22

      Hi Pierre,
      below is the testet php-code and the corresponding debugger-log.

      what I have done:
      I activate the debugger; (activate gets "gray")
      set a breakpoint to Line "echo $testvar";
      add "test2" with "eval selected" to the evaluation-window;
      hit "run" ( the debugger stopps at the breakpoint)
      ... but no Variable was shown in the evuluation-window. The same I have tested with "step-into" (every step is listed in the debugger-log - but not evuluation of the variable)

      <?php
      $testvar = "aggggbc";
      $test2= 'xxx';
      $a= 1;
      echo $testvar;
      phpinfo();
      ?>

      Debugger Log:
      <init fileuri="file:///C%3A%5Cxampplite%5Chtdocs%5Cphpinfo.php" language="PHP" protocol_version="1.0" appid="2068" idekey="devphp1"><engine version="2.0.0beta3-dev"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2005 by Derick Rethans]]></copyright></init>
      <response command="breakpoint_set" transaction_id="1" id="20680001"></response>
      <response command="run" transaction_id="2" status="break" reason="ok"></response>
      <response command="stack_get" transaction_id="3"><stack where="{main}" level="0" filename="file:///C%3A%5Cxampplite%5Chtdocs%5Cphpinfo.php" lineno="2"></stack></response>

      php.ini:
      ...
      zend_extension_ts="C:/Programme/Dev-php2_0_13/php/ext/php_xdebug.dll"
      ...
      [xdebug]
      xdebug.remote_enable=On
      xdebug.default_enable=On
      xdebug.remote_mode=req
      xdebug.remote_handler=dbgp
      xdebug.remote_host=127.0.0.1
      xdebug.remote_port=9000
      xdebug.idekey=devphp
      ...

      testet with Version 2.0.13.249 11-feb-2006

      the debugger-log lookes like the watch-variable was never send to the debugger (command: property_get -n "$a" -i 9 )
      like shown in the obove posting this command works if it was "manual" send with the xdebug test-client.

      ( I hope all tags ind the debug-log are shown )

      with kind regards
      Jürgen

       
    • Jürgen

      Jürgen - 2006-02-22

      some additional remarks:
      even "context_get" works (but I do not understand the "CDATA" from the string-Variables):

      debugger-log:
      <response command="context_get" transaction_id="93"><property name="a" fullname="$a" address="10245072" type="int"><![CDATA[1]]></property><property name="testvar" fullname="$testvar" address="10244720" type="string" encoding="base64"><![CDATA[YWdnZ2diYw==]]></property><property name="test2" fullname="$test2" address="10244552" type="string" encoding="base64"><![CDATA[eHh4]]></property></response>

      only in the "evalation"-Window no value was displayed.

      Jürgen

       
      • Pierre Fauconnier

        Hi Jürgen,

        xDebug speaks xml - why not ;)
        CDATA is a special keyword which comes with xml.
        Our debugger-log said
        $a=1
        Then xDebug added a base64, not really easy to translate (http://makcoder.sourceforge.net/demo/base64.php)
        $testvar='aggggbc' (translation of YWdnZ2diYw== )
        $test2='xxxx'      (translation of eHh4 )

        Since there were no 'arrays, objects', that was simple enough. Thus, imho, 'context_get' will have to implement a sort of object inspector in a future version ;)

        Best regards,
        Pierre.

         
        • Urs Mäder

          Urs Mäder - 2006-02-23

          really perfect feedback from pierre. :-)
          if you need more informations about the protokoll from xdebug please read:
          http://www.xdebug.org/docs-dbgp.php

          Best regards,
          urs maeder

           
    • Jürgen

      Jürgen - 2006-02-23

      thank you very much for the explanation of the xdebug protokoll ,-) even after sending the message I find myself that the data is "base64" coded.

      ... but to come again to  core of my posting:
      I want to report the following bug:

      Even when the xdebug communication works:
      The values of the variables are not shown in the evualation Window !!

      ( all the xdebug-logs are only include to show what happens in the background on the xdebug-communication)

      with kind regards
      Jürgen

       
    • Jürgen

      Jürgen - 2006-03-06

      Because I got no real answer to my core-question I want to ask again:

      Is this (not showing evulation of variables) a known bug in the experimental version 2.0.13.243 (because the debugging ins not full implemented until now)  ?

      or

      is this behavior not reproducible and the evulation of variables in the debugger should work in this version ?

      thanks for your work and
      kind regards
      Jürgen

       
      • Urs Mäder

        Urs Mäder - 2006-03-06

        Hi Jürgen

        the evaluation of variables is not working in the current versions of dev-php. debugging is not full implemented at this time and i have not the time to complete it, but i hope to work on it soon.
        thanks for the feedback.

        urs maeder

         
    • Jürgen

      Jürgen - 2006-03-06

      even if the answer is not so good for me, I thank you very much for your quick reply and your current work on dev-php.

      with kind regards
      Jürgen

       

Log in to post a comment.

MongoDB Logo MongoDB