This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | PHP debugger changes strings greater than 1024 to null | ||
---|---|---|---|
Product: | php | Reporter: | doliver3 |
Component: | Debugger | Assignee: | Ondrej Brejla <obrejla> |
Status: | CLOSED WONTFIX | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 230850 | ||
Bug Blocks: |
Description
doliver3
2013-06-05 08:09:24 UTC
This is not a problem of Java Debugger. Good to know that it is not a problem with Java debugger if you've tested that. Thanks. However, it is still a huge issue with the PHP debugger, and as far as I can tell it is not related to xdebug settings. In xdebug, I can bump up the size of variables it is handling by setting the value of xdebug.var_display_max_data to -1 or to some specific byte size like 2048. However, Netbeans still ignores these settings and always sets any Strings larger than 1024 to be the value 'null'. The whole point of an IDE debugger is to allow the developer to see the values in the variables. If the IDE cannot do that, the IDE's debugger is not much use. 1024 bytes is very arbitrarily low. We often have JSON variables these days that may have many kilobytes of data in them. A PHP developer needs to be able to pull these values out using the IDE debugger. My current xdebug settings are as follows... [xdebug] zend_extension="/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/xdebug.so" xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_handler=dbgp xdebug.remote_host=127.0.0.1 xdebug.remote_port=9000 ;xdebug.remote_autostart=1 xdebug.var_display_max_children=-1 xdebug.var_display_max_data=-1 xdebug.var_display_max_depth=-1 xdebug.remote_log="/var/log/xdebug.log" xdebug.remote_cookie_expire_time = 36000 xdebug.var_display_max_data=2048 I just tested that on Mac with the latest dev build and I see a bit different issue. <?php $test = str_repeat('a',2048); exit; // breakpoint here ?> If NB stops on BP, I see "Evaluating..." text in variable view. Which is strange, because if I move cursor over "$test" var, its content is shown properly and suddenly "Evaluating..." text disappears and the proper content is shown. I didn't see any "null" issue. But I will evaluate it further. Thanks. I just made some evaluation...if I increase MAX_DATA directly in NB code, everything works...but if I try to set it via xdebug.var_display_max_data=2048, it's ignored. Understand...NB module doesn't get setted value, but just 2014. It seems that that directive is ignored in php.ini. I will try to make some more evaluation... I have a suspicion that we both edit wrong php.ini :) No we edit the right PHP.ini ;) When I set a logging directory, communication is logged properly. But...In log I see this line: <- feature_get -i 69 -n max_data -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_get" transaction_id="69" feature_name="max_data" supported="1"><![CDATA[1024]]></response> Which is strange, because I have: xdebug.var_display_max_data = 3000 So for me it seems that XDebug has an issue itself...that it still sends us wrong max_data value, even when we set it directly in php.ini... (In reply to comment #6) > No we edit the right PHP.ini ;) Ehm...probably not exactly :) Logging works when I try to debug my script by "Run Configuration -> Script" if I change run configuration to "Local Web Site", logging doesn't work. But it still doesn't solve a problem, why xdebug.var_display_max_data = 3000 directive is ignored by XDebug even though the logging directive works... I just tested that on linux and it seems that the xdebug.var_display_max_data directive is ignored there too :( Everytime I get 1024. It doesn't metter what I set in php.ini, first returned value from XDebug itself is 1024. I found the cause of such a strange behavior...xdebug issue: http://bugs.xdebug.org/view.php?id=327 So it's a common behavior (since IDEs use remote debugging...). Ok, so I'll add an input to Options -> PHP -> Debugging to set a custom value of Max Data. Debugger part is done in web-main #ca5fe3f4c6ed. Waiting for issue #230850 to complete it. Fixed in web-main #1926847fc601 Integrated into 'main-golden', will be available in build *201306072301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/1926847fc601 User: Ondrej Brejla <obrejla@netbeans.org> Log: #230764 - PHP debugger changes strings greater than 1024 to null same problem with netbeans 8.1 Putting any String into the debugger that is greater than 1024 characters returns null. i have set xdebug.var_display_max_data=3000... but nothing Nobody is going to fix defects in NetBeans 8.1. If you can reproduce the issue in Apache NetBeans 10.0 then please report this defect to Apache Jira here: https://issues.apache.org/jira/secure/CreateIssue!default.jspa Thank you. Closing. |