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
请先登录再写评论。
Guenter,
What Xdebug version do you use?
Thank you for feedback!
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:
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!
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
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
Guenter,
Thanks for feedback! Please let us know if you will have any issues with debugging.