Eclipse PDT, XDebug Variable Watch Details only sh

2019-08-09 08:23发布

问题:

I am debugging using Eclipse PDT with XAMPP

This question is related to this item:

Variables viewer on Eclipse debugging truncates the string values

I am having the same problem as in that link.

I watch a variable and in the Expresssions tab, I can only view about 1000 characters in the "details" window.

If I right click and use 'copy expressions' I get the same 1000 chars.

I have also right clicked the details pane... Max Length and tried setting it to 0 or 30000 (my data is about 20k) and neither changed the max of 1000.

This defeats the whole purpose of me spending 2 days to get Eclipse setup for debugging... If there is no workaround for this, can anyone suggest a PHP debugger that will not have this limitation?

I was going to try the Zend debugger, but saw a video that suggested it uses the same exact Expresssion/Detail pane to show its data... can anyone confirm/deny this?

Thanks!

回答1:

In the Variables view you right-click on the variable and select Change value. If your variable is huge you have to wait a few minutes (in this case Eclipse doesn't respond to commands) but in the end Eclipse will show your variable entirely.



回答2:

I tried just about everything imaginable... I believe this is a bug in Eclipse that should be fixed, but anyway, I finally just create a new test case that eliminates me needing to debug a 20k piece of data...



回答3:

There isn't an option to set no limit but it is possible to increase the limit within the XDebug config.

Within Eclipse go to

Window -> Preferences -> PHP -> Debug -> Installed Debuggers.

Highlight XDebug and click Configure.

Within the window that pops up you can see the array depth and the max children. Setting those values higher will give you more data back about your variables.

source