[xdebug-dev] Bug 0000226: Xdebug2 doesn't show memory (or memory delta)

From: <noreply[@]lists.xdebug.org>
Date: Mon, 11 Dec 2006 21:56:33 +0100

A BUGNOTE has been added to this bug.
======================================================================
http://bugs.xdebug.org/bug_view_page.php?bug_id=0000226
======================================================================
Reporter: jeroen
Handler:
======================================================================
Project: Xdebug
Bug ID: 226
Category: Usage problems
Reproducibility: always
Severity: major
Priority: normal
Status: new
Operating System: Windows XP
PHP Version: 5.2.0
Xdebug Version: 2.0.0rc1
======================================================================
Date Submitted: 2006-12-11 11:57 CET
Last Modified: 2006-12-11 21:56 CET
======================================================================
Summary: Xdebug2 doesn't show memory (or memory delta)
Description:
Description:
------------
Xdebug doesn't show correct memory in trace file (maybe this has something
to do with the new memory management of PHP 5.2.0?)

Reproduce code:
---------------
I'm running PHP from command line

php -e -c "PHP_PATH/php.ini" -d error_reporting="E_ALL | E_STRICT" -d
zend_extension_ts="PATH/TO/php_xdebug-2.0.0rc1-5.2.0.dll" -d
xdebug.auto_trace=1 -d xdebug.trace_output_dir="SOME_PATH\tmp\trace" -d
xdebug.show_mem_delta=1 -d xdebug.trace_format=0 some_script.php

Expected result:
----------------
I expected to see a different number where it says "0" (memory usage) and
"+0" (memory delta). These numbers are the same troughout the script. It's
not very likely a script doesn't use any memory ;-)

Actual result:
--------------
These are the first 10 lines from the trace file:

TRACE START [2006-12-11 10:41:26]
    0.0008 0 +0 -> {main}()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:0
    0.0010 0 +0 -> test_function()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:25
    0.0011 0 +0 -> trim()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:8
    0.0012 0 +0 -> round()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:8
    0.0013 0 +0 -> TestClass->__construct()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:26
    0.0016 0 +0 -> TestClass->DoSomething()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:27
    0.0016 0 +0 -> rand()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:19
    0.0017 0 +0 -> array_flip()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:20
    0.0018 0 +0 -> test_function()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:25
    0.0018 0 +0 -> trim()
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\script\ProfileTest.php:8

======================================================================

----------------------------------------------------------------------
 jeroen - 2006-12-11 12:09 CET
----------------------------------------------------------------------
Some additional phpinfo information (sorry I forgot to add it to the
orginal report):

phpinfo()
PHP Version => 5.2.0

System => Windows NT RAHRAH 5.1 build 2600
Build Date => Nov 2 2006 11:50:55
Configure Command => cscript /nologo configure.js
"--enable-snapshot-build" "--with-gd=shared"
Server API => Command Line Interface
Virtual Directory Support => enabled
Configuration File (php.ini) Path => D:\server\php\php-5.2.0\php.ini
PHP API => 20041225
PHP Extension => 20060613
Zend Extension => 220060519
Debug Build => no
Thread Safety => enabled
Zend Memory Manager => enabled
IPv6 Support => enabled
Registered PHP Streams => php, file, data, http, ftp, compress.zlib,
https, ftps
Registered Stream Socket Transports => tcp, udp, ssl, sslv3, sslv2, tls
Registered Stream Filters => convert.iconv.*, string.rot13,
string.toupper, string.tolower, string.strip_tags, convert.*, consumed,
zlib.*

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2006 Zend Technologies
    with Xdebug v2.0.0RC1, Copyright (c) 2002, 2003, 2004, 2005, 2006, by
Derick Rethans

 _______________________________________________________________________

xdebug

xdebug support => enabled
Version => 2.0.0RC1

Supported protocols => Revision
DBGp - Common DeBuGger Protocol => $Revision: 1.99 $
GDB - GNU Debugger protocol => $Revision: 1.81 $
PHP3 - PHP 3 Debugger protocol => $Revision: 1.20 $

Directive => Local Value => Master Value
xdebug.allowed_clients => no value => no value
xdebug.auto_trace => On => On
xdebug.collect_includes => On => On
xdebug.collect_params => Off => Off
xdebug.collect_return => Off => Off
xdebug.collect_vars => Off => Off
xdebug.default_enable => On => On
xdebug.dump.COOKIE => no value => no value
xdebug.dump.ENV => no value => no value
xdebug.dump.FILES => no value => no value
xdebug.dump.GET => no value => no value
xdebug.dump.POST => no value => no value
xdebug.dump.REQUEST => no value => no value
xdebug.dump.SERVER => no value => no value
xdebug.dump.SESSION => no value => no value
xdebug.dump_globals => On => On
xdebug.dump_once => On => On
xdebug.dump_undefined => Off => Off
xdebug.extended_info => On => On
xdebug.idekey => Jeroen => no value
xdebug.manual_url => http://www.php.net => http://www.php.net
xdebug.max_nesting_level => 100 => 100
xdebug.profiler_aggregate => Off => Off
xdebug.profiler_append => Off => Off
xdebug.profiler_enable => Off => Off
xdebug.profiler_enable_trigger => Off => Off
xdebug.profiler_output_dir => /tmp => /tmp
xdebug.profiler_output_name => crc32 => crc32
xdebug.remote_autostart => Off => Off
xdebug.remote_enable => Off => Off
xdebug.remote_handler => dbgp => dbgp
xdebug.remote_host => localhost => localhost
xdebug.remote_log => no value => no value
xdebug.remote_mode => req => req
xdebug.remote_port => 9000 => 9000
xdebug.show_exception_trace => Off => Off
xdebug.show_local_vars => Off => Off
xdebug.show_mem_delta => On => On
xdebug.trace_format => 0 => 0
xdebug.trace_options => 0 => 0
xdebug.trace_output_dir =>
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\\tmp\trace =>
D:\server\www\sobe-1.2\Test\AdvProfiler\xdebug\\tmp\trace
xdebug.trace_output_name => crc32 => crc32
xdebug.var_display_max_data => 512 => 512
xdebug.var_display_max_depth => 2 => 2

----------------------------------------------------------------------
 jeroen - 2006-12-11 12:16 CET
----------------------------------------------------------------------
Also, I experienced the same problem with APD for PHP 5.2.0
(http://nl3.php.net/apd)

I don't know about previous versions of PHP, I haven't tried them as I
don't have the binaries of those versions.

----------------------------------------------------------------------
 derick - 2006-12-11 21:56 CET
----------------------------------------------------------------------
Please try the latest version from
http://pecl4win.php.net/ext.php/php_xdebug.dll, this should be fixed.

Bug History
Date Modified Username Field Change
======================================================================
2006-12-11 11:57jeroen New Bug
2006-12-11 11:57jeroen Bug Monitored: jeroen
2006-12-11 12:09jeroen Bugnote Added: 0000502
2006-12-11 12:16jeroen Bugnote Added: 0000503
2006-12-11 21:56derick Bugnote Added: 0000504
======================================================================
Received on Mon Dec 11 2006 - 21:56:40 GMT

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST