6

When I set a breakpoint in my PHP code I cannot see the content of a string variable because in the variables Value column it says "Evaluating...". What can be done to prevent this from happening? What is this, a timing problem? Can it be fixed with another setting?

I have seen this before but now I really need to know the value to find out my error.

I could isolate the problem and apparently it has to do with the result of PHP implode() that somehow takes too long or something.

ñull
  • 504
  • 4
  • 17

3 Answers3

7

I did not use Watches to evaluate the variable that was pending. I have no Watches and Balloon Evaluation set. I only use the Debug Variable display. I discovered that in my case the "Maximum Data Length" setting was too small. The variable value went beyond this limit. I was able to fix the issue by raising the limit.

ñull
  • 504
  • 4
  • 17
  • 1
    Mine was 2048 (probably by default). 4096 worked for me. Thanks. – Ryan Sep 21 '19 at 18:26
  • 1
    And to clarify, the "Maximum Data Length" setting is at NetBeans > Tools > Options > PHP > Debugging > "Maximum Data Length" (also shown in the screenshot here https://stackoverflow.com/a/39963917/470749 ). Mine was 2048 (probably by default). 16384 worked for me just now for my purposes where I had a huge JSON string. Thanks. – Ryan Mar 12 '20 at 22:39
2

Open netbeans, to to Tools -> Options -> PHP

When you use Watches, then make sure Watches and Balloon Evaluation is checked:

enter image description here

Also make sure that variables you want to evaluate don't hit the "Maximum Data Length" limit. Adjust this when necessary.

Community
  • 1
  • 1
Dekel
  • 60,707
  • 10
  • 101
  • 129
  • 1
    There was nothing in the question about Watches. The other answer is more appropriate. – colan Jan 29 '18 at 21:30
0

It's been a white since this question was posted, but as it came up as the top result when I was searching for an answer and none are correct - here is the correct answer.

Change the tools -> options -> php -> debugging ->maximum data length to a bigger number. I used 50000 before longer strings became visible.

See a screenshot of the settings here

dyg
  • 11
  • 2