NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Very long strings in local variables


Joined: 28 Sep 2013
Posts: 84
Location: Pantin, IDF, France
Reply with quote
Hello,

I have a (remote) project where some scripts may need to load very long strings (about 1Mb, actually whole PDF file contents so it could eventually be larger again) in some variables.
When debugging, PhpED try to display the contents of these variables, and this eats so much resources in the debugger that finally almost no variables can be displayed.

I would like to know if there is some mean in PhpED for limiting the display of the contents of very long strings (like displaying only their first 1000 bytes and telling the actual length) in order to still be able to properly browse among local or global variables?

I know I can disable some variables and use only the Watch window for viewing the contents of selected variables, but loosing the ability of browsing among variables makes the debugging much less practical.

I looked for some global option already allowing to do that, but I didn't find.
Either it don't exists or it is buried too much deeply.

Regards,
Gingko
View user's profileFind all posts by GingkoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I don't know any better solution for developing such scripts where you deal with large variables, but arranging environment as closer as possible to your front-end IDE, preferably on local desktop or on a locally running VM.
You may also want to think about storing large values by chunks in a locally running cache or something like that instead of PHP.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 28 Sep 2013
Posts: 84
Location: Pantin, IDF, France
Reply with quote
dmitri wrote:
I don't know any better solution for developing such scripts where you deal with large variables, but arranging environment as closer as possible to your front-end IDE, preferably on local desktop or on a locally running VM.
You may also want to think about storing large values by chunks in a locally running cache or something like that instead of PHP.
My script works fine with large variables, and wouldn't normally have necessary resources to work on local VM without having to copy there also a huge database system with quickly changing data and a lot of other resources. Such copy would likely need weeks of debugging by itself, if even my local disks have enough space to host it.

Wouldn't it be possible to have the debugger displaying (and thus transferring) only small excerpts of these long variables, along with the actual length, and include in the display zone for example a button for viewing the whole contents, only if needed, in a hex viewer window ? (it would be useful anyway to be able to view any string in a hex viewer window, even if it is short).

As a hex viewer window is expected to be scrollable, this wouldn't require transferring the whole string across the network, only the viewed parts would have to be copied from the server to the IDE.

Gingko
View user's profileFind all posts by GingkoSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Debugger shipped with PhpED 18 comes with significant improvements in handling large values. Have you got a chance to try v18 or v19?
As of what you suggested, thanks, we already have similar plans for near future.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 28 Sep 2013
Posts: 84
Location: Pantin, IDF, France
Reply with quote
dmitri wrote:
Debugger shipped with PhpED 18 comes with significant improvements in handling large values. Have you got a chance to try v18 or v19?
As of what you suggested, thanks, we already have similar plans for near future.
I am using v19.1 build 19111.

Gingko
View user's profileFind all posts by GingkoSend private message
Very long strings in local variables
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic