Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000971XdebugFeature/Change requestpublic2013-08-22 18:322013-10-14 02:33
ReporterRQuadling 
Assigned Toderick 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version2.2.3 
Target VersionFixed in Version2.3dev 
Summary0000971: Cannot use xdebug_get_tracefile_name() output for xdebug_start_trace()
DescriptionThe test script below outputs ...

Thu, 22 Aug 2013 18:28:23 +0100 - XDebug trace file is /tmp/trace.4236609918.xt
Thu, 22 Aug 2013 18:28:23 +0100 - XDebug tracing disabled
Thu, 22 Aug 2013 18:28:23 +0100 - XDebug tracing enabled
Thu, 22 Aug 2013 18:28:23 +0100 - XDebug trace file is /tmp/trace.4236609918.xt.xt

As you can see, the trace filename has an extra '.xt' appended.
Steps To Reproduce<?php
function logger($s_Text){
    echo date('r - '), $s_Text, PHP_EOL;
}

$s_Trace = xdebug_get_tracefile_name();
logger('XDebug trace file is ' . $s_Trace);
xdebug_stop_trace();
logger('XDebug tracing disabled');
xdebug_start_trace($s_Trace, XDEBUG_TRACE_APPEND);
logger('XDebug tracing enabled');
$s_Trace = xdebug_get_tracefile_name();
logger('XDebug trace file is ' . $s_Trace);
?>
Additional InformationUsing PHP V5.4.17.
TagsNo tags attached.
Operating SystemCentos
PHP Version5.4.10-5.4.14
Attached Files

- Relationships

-  Notes
(0002561)
derick (administrator)
2013-09-28 14:07

Hi,

This is not a bug, but an unfortunate choice when I implemented the function. xdebug_start_trace() always adds .xt to the end, as is described here: http://xdebug.org/docs/execution_trace#xdebug_start_trace [^]

I will probably want to fix this when Xdebug 3 comes around, but I wouldn't want to break BC for this right now. What I can do, is add another flag, f.e. XDEBUG_TRACE_NAKED_FILENAME so that you don't have to parse and strip out the .xt yourself. Would that work?

cheers,
Derick
(0002566)
RQuadling (reporter)
2013-09-29 11:56

That would be fine. It wasn't until about 2 days ago did I get around to seeing that in the dox (RTFM!).

Currently, I am stripping the .xt off, but that is dangerous as it assumes the extension IS .xt and that the user hasn't decided upon a different name (if that's possible).

So, a flag that allowed xdebug_start_trace() to accept the name as is would certainly be the good for me.

Thanks.

Richard.
(0002585)
derick (administrator)
2013-10-14 02:33

I have added the XDEBUG_TRACE_NAKED_FILENAME option to xdebug_start_trace().

- Issue History
Date Modified Username Field Change
2013-08-22 18:32 RQuadling New Issue
2013-09-28 14:07 derick Note Added: 0002561
2013-09-28 14:07 derick Assigned To => derick
2013-09-28 14:07 derick Status new => feedback
2013-09-29 11:56 RQuadling Note Added: 0002566
2013-09-29 11:56 RQuadling Status feedback => assigned
2013-10-14 01:46 derick Category Usage problems => Feature/Change request
2013-10-14 02:33 derick Note Added: 0002585
2013-10-14 02:33 derick Status assigned => closed
2013-10-14 02:33 derick Resolution open => fixed
2013-10-14 02:33 derick Fixed in Version => 2.3dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker