View Issue Details

IDProjectCategoryView StatusLast Update
0000846Xdebugpublic2013-09-28 12:33
Reporterlaurin1 Assigned Toderick  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
PlatformIISOSWindowsOS Version7
Product Version2.2.0 
Fixed in Version2.2.4 
Summary0000846: Cannot View Values Of Large Strings
Description

I cannot view the values of large strings. Works fine in 2.1.3, but in 2.2.0, when I try to view these values, they are empty. By large strings, I mean anything outside my clients parameters.

My client is PHPStorm, and I don't have any others to test, but I'd be happy to validate in another application with some help configuring it. I have screen shots available and it fails in a very simple test file that I have created.

Steps To Reproduce
  1. Load test3.php with XDebug 2.2.0 enabled
  2. Break on line 225
  3. Try to inspect or copy value of $s

What is the expected result?
The entire string assigned to $s is viewed or copied.

What happens instead?
$s appears to be empty, even though preview in console is not.

Attaching good and bad screen shot of production code.

This works fine in XDebug 2.1.3.

TagsNo tags attached.
Attached Files
test3.zip (261,776 bytes)
xdebug.log (28,709 bytes)
Operating SystemWindows 7 x64
PHP Version5.3.12

Activities

laurin1

2012-05-29 22:04

reporter   ~0002217

This works fine in XDebug 2.1.3 and XDebug 2.2.0 RC1. It breaks in 2.2.0 RC2 and 2.2.0.

derick

2012-06-01 21:02

administrator   ~0002224

Hi! It would be really helpful if you could provide a remote debugging log as well. Please look at http://xdebug.org/docs/all_settings#remote_log on how to make one.

laurin1

2012-06-04 15:29

reporter   ~0002232

I have one, but I'm concerned about posting this file for all to see.

derick

2012-06-10 13:39

administrator   ~0002240

Do you want it fixed or not?

laurin1

2012-06-10 17:55

reporter   ~0002241

The file may contain sensitive information (it's hard to tell, it's big.) Are you saying the only way I can get this fixed is if I risk compromising my companies security? Isn't there a more secure way that I can get you the file?

derick

2012-06-11 16:09

administrator   ~0002244

Considering you already uploaded the file containing the data in your test3.zip file, that point makes little sense.

laurin1

2012-06-11 16:18

reporter   ~0002246

That file does not contain the values of variables, my log does.

awellis13

2012-06-11 19:44

reporter   ~0002248

Last edited: 2012-06-11 19:48

I have uploaded an xdebug.log file for you to look at. This is me coming in, landing on the breakpoint, trying to copy the value as well as "Click to see the full value" operation; then finally resuming the program.

This is within PhpStorm 4.0.2 build 117.501.

Let me know if I can provide any other information. This is a really pain in the neck bug as I'm trying to inspect huge JSON strings.

PS: @laurin1 if you would have truncated your log and then ran a simple test for this issue, you would have seen the log entries contain base64 encoded data. You could have worked with the xdebug team to see what this contains. From the looks of it, it contains $_SERVER and $_GLOBAL variables.

Fortunately I'm not as concerned about the details of my local PHP/Apache as it is strictly development and I'm behind a secure network. :)

laurin1

2012-06-12 15:23

reporter   ~0002251

@awellis13 - I would be happy to send it to them, but I just wasn't comfortable with posting it where everyone can see it. We've had a serious information leak occur in the past, by posting a log that way. Surely, they could provide some means to send data in a secure fashion. I did look through the log and it could contain some sensitive, non-encoded data, depending on the variables grabbed (and again, the log is huge, and I don't have time to comb through every piece of to be 100% certain.) It might not be a risk for you, but it is for me.

awellis13

2012-06-12 15:53

reporter   ~0002252

Sorry if I sounded snarky... Was having a stressful day and this bug wasn't helping :(

In the future though, if a bug like this happens your best bet is to setup a test script that does not contain sensitive information and reproduce the steps that way. That is what I did, I just took a simple three line script and JSON encoded a massive array containing random crap. :)

laurin1

2012-06-12 16:08

reporter   ~0002253

I understand about stressful days. :)

Anyway, the problem is that we have passwords in server environment variables. I would literally have to configure another machine to do that, and I suppose I could, but we work with PHPStorm a great deal and their bug tracking system has the ability to upload files with "developer only" security. I'm swamped and having to spend so much time assisting in the debugging of someone else's software, albeit one that I use A LOT and LOVE, is hard to find time for.

derick

2012-06-12 16:45

administrator   ~0002254

You can mail it to me but please make sure the script and log that you mail match and I can run the script without any external resources or libraries

laurin1

2012-06-12 17:15

reporter   ~0002255

Done.

nnmatveev

2012-06-14 11:02

reporter   ~0002256

Related issues from the PhpStorm issue tracker:

http://youtrack.jetbrains.com/issue/WI-11408
http://youtrack.jetbrains.com/issue/WI-11497

nnmatveev

2012-06-25 14:13

reporter   ~0002271

Last edited: 2012-06-25 14:13

@Dearick
I've attached the code fragment and Xdebug logs with various PHP/Xdebug versions (see issue_846_Nikolai.Matveev.zip). The script is very simple:

<?php
$var = print_r(get_defined_functions(), true);
echo $var; //breakpoint here

Please look at the issue, because it prevents some users from using PHP 5.4 (because of unstable version of Xdebug)

derick

2012-06-25 17:39

administrator   ~0002272

Last edited: 2012-06-25 17:46

Your command is:

property_value -i 12 -d 0 -c 0 -n $var -p 0 -m 0

-m is for the maximum value to return, and you specific 0 so it will return 0 bytes of the large value: ie, nothing. It's possible that this has changed from previously, but "0" does not mean unlimited (say the docs): http://xdebug.org/docs-dbgp.php#property-get-property-set-property-value

I'll add a test case for property_value though, as we don't have one yet.

Issue History

Date Modified Username Field Change
2012-05-29 21:50 laurin1 New Issue
2012-05-29 21:50 laurin1 File Added: test3.zip
2012-05-29 22:04 laurin1 Note Added: 0002217
2012-06-01 21:02 derick Note Added: 0002224
2012-06-01 21:02 derick Assigned To => derick
2012-06-01 21:02 derick Status new => feedback
2012-06-04 15:29 laurin1 Note Added: 0002232
2012-06-04 15:29 laurin1 Status feedback => assigned
2012-06-10 13:39 derick Note Added: 0002240
2012-06-10 17:55 laurin1 Note Added: 0002241
2012-06-11 16:09 derick Note Added: 0002244
2012-06-11 16:10 derick Status assigned => feedback
2012-06-11 16:18 laurin1 Note Added: 0002246
2012-06-11 16:18 laurin1 Status feedback => assigned
2012-06-11 19:43 awellis13 File Added: xdebug.log
2012-06-11 19:44 awellis13 Note Added: 0002248
2012-06-11 19:48 awellis13 Note Edited: 0002248
2012-06-11 19:48 awellis13 Note Edited: 0002248
2012-06-12 15:23 laurin1 Note Added: 0002251
2012-06-12 15:53 awellis13 Note Added: 0002252
2012-06-12 16:08 laurin1 Note Added: 0002253
2012-06-12 16:45 derick Note Added: 0002254
2012-06-12 17:15 laurin1 Note Added: 0002255
2012-06-14 11:02 nnmatveev Note Added: 0002256
2012-06-25 14:11 nnmatveev File Added: issue_846_Nikolai.Matveev.zip
2012-06-25 14:13 nnmatveev Note Added: 0002271
2012-06-25 14:13 nnmatveev Note Edited: 0002271
2012-06-25 17:39 derick Note Added: 0002272
2012-06-25 17:39 derick Status assigned => resolved
2012-06-25 17:39 derick Resolution open => no change required
2012-06-25 17:46 derick Note Edited: 0002272
2013-09-28 12:33 derick Status resolved => closed
2013-09-28 12:33 derick Fixed in Version => 2.2.4
2016-07-31 12:35 derick Category Debug client (console) => debugclient (debugging tool)
2016-07-31 12:35 derick Category debugclient (debugging tool) => (No Category)