MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001527XdebugUsage problems (Wrong Results)public2018-02-15 15:142018-02-18 15:35
Reporterokriz 
Assigned Toderick 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionno change required 
PlatformOSOS Version
Product Version2.6.0 
Target VersionFixed in Version 
Summary0001527: true shown as false in PhpStorm Debug->Variables view under UTF-8 Keys (array, stdClass)
DescriptionWhen inspecting a variable (array or stdClass) with UTF-8 key(s) in PhpStorm:
- Debug->Variables: shows boolean true as boolean false on expand of those keys
- Evaluate Expression: shows boolean true as boolean false on expand of those keys
- Evaluate Expression: shows boolean true as boolean true on evaluate the whole statement
- Debug Console: shows boolean true as boolean true for both cases

Discovered while inspecting json_decoded'ed structures containing German Umlauts
Steps To ReproduceTest file will get attached
inspect as in description (btw: this Mantis DB does not support UTF-8 Characters U+2EEA, U+2002 as well) ;)
Additional InformationTested and reproduced this behavior with:

PhpStorm 2017.3
Build #PS-173.3727.138, built on November 28, 2017
JRE: 1.8.0_152-release-1024-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.3

in combination with:

PHP 7.2.0 (cli) (built: Dec 12 2017 17:02:58) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2017 Zend Technologies
with Xdebug v2.6.0alpha1, Copyright (c) 2002-2017, by Derick Rethans

as well as:

PhpStorm 2017.3.4
Build #PS-173.4548.32, built on January 30, 2018
JRE: 1.8.0_152-release-1024-b11 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.13.3

in combination with

PHP 7.2.2 (cli) (built: Feb 14 2018 18:26:07) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans


Executed with:
1) php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_log=/tmp/xdebug.log XDEBUG_TEST.php
2) php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_log=/tmp/xdebug.log -dxdebug.extended_properties=1 XDEBUG_TEST.php
3) php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=127.0.0.1 -dxdebug.remote_log=/tmp/xdebug.log -dxdebug.extended_properties=1 -dxdebug.encoding=UTF-8 XDEBUG_TEST.php
TagsNo tags attached.
Operating SystemMac OS X High Sierra 10.13.3
PHP Version7.2.0-7.2.4
Attached Files? file icon XDEBUG_TEST.php [^] (422 bytes) 2018-02-15 15:14
log file icon xdebug.log [^] (38,841 bytes) 2018-02-15 15:15
png file icon Bildschirmfoto 2018-02-15 um 15.59.11.png [^] (79,728 bytes) 2018-02-15 15:15


png file icon Bildschirmfoto 2018-02-15 um 15.59.39.png [^] (55,750 bytes) 2018-02-15 15:16


png file icon Bildschirmfoto 2018-02-15 um 15.59.51.png [^] (49,185 bytes) 2018-02-15 15:16


png file icon Bildschirmfoto 2018-02-15 um 16.00.04.png [^] (101,464 bytes) 2018-02-15 15:16


png file icon Bildschirmfoto 2018-02-15 um 16.00.22.png [^] (133,156 bytes) 2018-02-15 15:17

- Relationships

-  Notes
(0004593)
okriz (reporter)
2018-02-15 15:18

I checked the xdebug.log remote log and it seems alright. Not sure what causes this strange behavior. Maybe it's on jetbrains - not sure how the different debug views are executed
(0004594)
derick (administrator)
2018-02-18 15:35

Hi,

I can reproduce this with PhpStorm, but I also believe that's where the problem lies. The output in Xdebug for:

property_get -i 44 -n "$jsonArray[\"ΓΌ2\"]" -d 0 -c 0 -p 0

returns (correctly):

<response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" [^] command="property_get" transaction_id="44"><property type="array" children="1" numchildren="2" page="0" pagesize="100"><name encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl0=]]></name><fullname encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl0=]]></fullname><property name="true" type="bool"><fullname encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl1bInRydWUiXQ==]]></fullname><value encoding="base64"><![CDATA[MQ==]]></value></property><property name="false" type="bool"><fullname encoding="base64"><![CDATA[JGpzb25BcnJheVsiw7wyIl1bImZhbHNlIl0=]]></fullname><value encoding="base64"><![CDATA[MA==]]></value></property></property></response>

The values (<![CDATA[MQ==]]>) and (<![CDATA[MA==]]>) are "1" and "0" respectively, but PhpStorm shows them both as false in the UI.

I filed the following ticket with them: https://youtrack.jetbrains.com/issue/WI-40762 [^]

And I'm closing this issue, as this is not a bug in Xdebug. Thanks for the detailed report!

cheers,
Derick

- Issue History
Date Modified Username Field Change
2018-02-15 15:14 okriz New Issue
2018-02-15 15:14 okriz File Added: XDEBUG_TEST.php
2018-02-15 15:15 okriz File Added: xdebug.log
2018-02-15 15:15 okriz File Added: Bildschirmfoto 2018-02-15 um 15.59.11.png
2018-02-15 15:16 okriz File Added: Bildschirmfoto 2018-02-15 um 15.59.39.png
2018-02-15 15:16 okriz File Added: Bildschirmfoto 2018-02-15 um 15.59.51.png
2018-02-15 15:16 okriz File Added: Bildschirmfoto 2018-02-15 um 16.00.04.png
2018-02-15 15:17 okriz File Added: Bildschirmfoto 2018-02-15 um 16.00.22.png
2018-02-15 15:18 okriz Note Added: 0004593
2018-02-18 15:35 derick Note Added: 0004594
2018-02-18 15:35 derick Status new => resolved
2018-02-18 15:35 derick Resolution open => no change required
2018-02-18 15:35 derick Assigned To => derick


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker