Ivan Gretsky Posted January 18, 2022 Share Posted January 18, 2022 Good day, @adrian! I am trying to bd() $config->paths, but I can only see first 100 items. Is there a way to show more? Didn't find any configuration for this. Link to comment Share on other sites More sharing options...
bernhard Posted January 18, 2022 Share Posted January 18, 2022 bdb() or barDumpBig() 2 Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 @Ivan Gretsky - there is already an issue about this on the core Tracy repo: https://github.com/nette/tracy/issues/531 Once this is made available, I'll support it in this module. 1 Link to comment Share on other sites More sharing options...
bernhard Posted January 18, 2022 Share Posted January 18, 2022 --disregard-- Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 To clarify @bernhard depth is the number of levels in an array, vs the number of items in the array. 1 Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 @Ivan Gretsky - if you need this immediately, you can always edit this: https://github.com/adrianbj/TracyDebugger/blob/e6088e92ddb052382382edf290077d929832410f/tracy-2.9.x/src/Tracy/Dumper/Describer.php#L34 1 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted January 18, 2022 Author Share Posted January 18, 2022 Thanks, got it! Please add your thumbs ups to the issue, so it gets more attention) Link to comment Share on other sites More sharing options...
bernhard Posted January 18, 2022 Share Posted January 18, 2022 did dbd() not work for you? Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 1 minute ago, bernhard said: did dbd() not work for you? It won't fix this issue though because the "big" version of those methods only increases the "maxDepth" and "maxLength" attributes. It doesn't support increasing the "maxItems". In fact maxItems is new to the Tracy core in 2.8 and 2.9. In 2.7 and earlier there was no limit to the number of items so this setting wasn't needed as all items would have been dumped. Link to comment Share on other sites More sharing options...
bernhard Posted January 18, 2022 Share Posted January 18, 2022 Ok strange because I tested it today myself and it just worked for 110 items, so I thought it works as expected?! ?♂️ Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 Just now, bernhard said: Ok strange because I tested it today myself and it just worked for 110 items, so I thought it works as expected?! ?♂️ Are you sure it's actually showing all 110? It shows the total count, but the not all items are shown - at least that's what I am seeing. Link to comment Share on other sites More sharing options...
bernhard Posted January 18, 2022 Share Posted January 18, 2022 yes ? ... ps: same for d() 1 Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 Interesting - I am seeing that also with that example, but definitely items are truncated to 100 when dumping $config->paths and if I force Tracy to use 2.7 then it's no longer truncated. I don't know why there is a difference - maybe there is some logic that controls when the $maxItems of 100 is implemented? Link to comment Share on other sites More sharing options...
bernhard Posted January 18, 2022 Share Posted January 18, 2022 18 minutes ago, adrian said: I don't know why there is a difference - maybe there is some logic that controls when the $maxItems of 100 is implemented? Well that's two different dumps... one is dumping the array and one is dumping an object that has an array inside the data property! d($config->paths); d($config->paths->data); Personally I think that behaviour is good ? 2 Link to comment Share on other sites More sharing options...
adrian Posted January 18, 2022 Share Posted January 18, 2022 Good catch - thanks for noticing that - I'm not on it this morning apparently :) Well @Ivan Gretsky - at least using $config->paths->data should work for you. I'll still keep an eye on that $maxItems setting and implement when available and see if it handles that other situation. 2 Link to comment Share on other sites More sharing options...
Ivan Gretsky Posted February 3, 2022 Author Share Posted February 3, 2022 On 1/18/2022 at 9:03 PM, adrian said: I'll still keep an eye on that $maxItems setting and implement when available and see if it handles that other situation. Seems to be fixed. 1 Link to comment Share on other sites More sharing options...
adrian Posted February 3, 2022 Share Posted February 3, 2022 Thanks @Ivan Gretsky - I've implemented it locally (will commit soon) with a 100 default and 250 for the "big" version and of course you can change it as needed with: d($config->paths, [n, n, 500]); or: d($config->paths, ['maxItems' => 500]); 1 Link to comment Share on other sites More sharing options...
adrian Posted February 4, 2022 Share Posted February 4, 2022 @Ivan Gretsky - new version with this is now available. Note that in the end I didn't actually need the update to the Tracy core because I am actually overwriting their dump and barDump methods anyway - sorry I didn't notice that sooner. Let me know if you notice any problems - this hasn't had a lot of testing yet. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now