value of variables in debug mode

while debugging a PHP - script (now a web application based on ZF 1, local Apache webserver on Ubuntu 9.04) and trying to analyze the value of a variable I'm getting the following behaviour:


- setting a breakpoint is possible (the flow stops)
- moving the cursor above a variable (to analyze the value) or dropping the value in the 'watching - window' the control flow often (not always) continues suddenly until the end of the request and debugging isn't possible anymore
- this happens in various debug configurations (Web Application, PHP HTTP request or single PHP script)  
- I'm using the latest phpStorm version with xDebug Configuration (was the same with version 3)

- I'm more experienced with IntelliJ or Python (pyCharm) and I never encountered the same behaviour there
(I skimmed through various descriptions how to debug PHP applications but my impression is that a lot of people are struggling with it - PHP debugging seems not to be a simple case....)

Any advice or hint?

Thanks!

Günter

6 comments
Comment actions Permalink

Guenter,

What Xdebug version do you use?

Thank you for feedback!

0
Comment actions Permalink

Dear Nikolay,


thanks for responding!

phpinfo() tells me:

Version 2.0.5
Im running Ubuntu 10.04

For the rest of the configuration see the list at the bottom of my answer.

with the php command on the console I get
swissbib@ub-lenovo6:~/iwerk/websites/suzanne/typo3site/typo3conf$ php
PHP Warning:  Module 'xdebug' already loaded in Unknown on line 0

I don't understand why the warning is upcoming. Perhaps this might be a reason for the behaviour because I got this method in the past when starting a Request in phpstporm in debug mode.
I tried it just now in phpstorm again but the warning doesn't appear again. Next week I'm starting a bigger PHP project perhaps by then I can deliver more detailed information


Günter



For the rest of the configuration I get:

xdebug.auto_trace Off Off
xdebug.collect_includes On On
xdebug.collect_params 0 0
xdebug.collect_return Off Off
xdebug.collect_vars Off Off
xdebug.default_enable On On
xdebug.dump.COOKIE no value no value
xdebug.dump.ENV no value no value
xdebug.dump.FILES no value no value
xdebug.dump.GET no value no value
xdebug.dump.POST no value no value
xdebug.dump.REQUEST no value no value
xdebug.dump.SERVER no value no value
xdebug.dump.SESSION no value no value
xdebug.dump_globals On On
xdebug.dump_once On On
xdebug.dump_undefined Off Off
xdebug.extended_info On On
xdebug.idekey no value no value
xdebug.manual_url http://www.php.net http://www.php.net
xdebug.max_nesting_level 100 100
xdebug.profiler_aggregate Off Off
xdebug.profiler_append Off Off
xdebug.profiler_enable Off Off
xdebug.profiler_enable_trigger Off Off
xdebug.profiler_output_dir /tmp/xdebug /tmp/xdebug
xdebug.profiler_output_name trace%s trace%s
xdebug.remote_autostart Off Off
xdebug.remote_enable On On
xdebug.remote_handler dbgp dbgp
xdebug.remote_host localhost localhost
xdebug.remote_log /var/log/xdebug.php.log /var/log/xdebug.php.log
xdebug.remote_mode req req
xdebug.remote_port 9000 9000
xdebug.show_exception_trace Off Off
xdebug.show_local_vars Off Off
xdebug.show_mem_delta Off Off
xdebug.trace_format 0 0
xdebug.trace_options 0 0
xdebug.trace_output_dir /tmp /tmp
xdebug.trace_output_name trace.%c trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth 3 3
0
Comment actions Permalink

Guenter,

Please upgrade to Xdebug 2.1.2 or Xdebug 2.2.0. There are a lot of issue related to evaluation in your Xdebug version.

Thank you for feedback!

0
Comment actions Permalink

Hi Nikolay,

thanks for the hint. I just made an update to the latest version 2.2 and started a short test - it seems to be better. At the moment I don't have enough time for more detailed testing. I will let you know.

Best wishes from Basel!

Günter

0
Comment actions Permalink

Hi Nikolay,

as promised my feedback.
I'm using by now the latest version of xDebug (2.2.0) since 3 days - debugging an application based on Zend-Framework 1 to get to know both (application and ZF) - so a request has to do quite a lot of bootstrapping and other stuff.

I never got this strange behaviour that the control flow continued and debugging wasn't possible at all.
Thanks for the hint! I only can recommend to use the latest version.

Best wishes from Basel

Günter

0
Comment actions Permalink

Guenter,

Thanks for feedback! Please let us know if you will have any issues with debugging.

0

Please sign in to leave a comment.