View Issue Details

IDProjectCategoryView StatusLast Update
0000971XdebugTracingpublic2020-03-12 17:34
ReporterRQuadling Assigned Toderick  
Status closedResolutionfixed 
Product Version2.2.3 
Fixed in Version2.3.0 
Summary0000971: Cannot use xdebug_get_tracefile_name() output for xdebug_start_trace()

The 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

function logger($s_Text){
echo date('r - '), $s_Text, PHP_EOL;

$s_Trace = xdebug_get_tracefile_name();
logger('XDebug trace file is ' . $s_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 Information

Using PHP V5.4.17.

TagsNo tags attached.
Operating SystemCentos
PHP Version5.4.10-5.4.14



2013-09-28 13:07

administrator   ~0002561


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:

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?



2013-09-29 10:56

reporter   ~0002566

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.




2013-10-14 01:33

administrator   ~0002585

I have added the XDEBUG_TRACE_NAKED_FILENAME option to xdebug_start_trace().

Issue History

Date Modified Username Field Change
2013-08-22 17:32 RQuadling New Issue
2013-09-28 13:07 derick Note Added: 0002561
2013-09-28 13:07 derick Assigned To => derick
2013-09-28 13:07 derick Status new => feedback
2013-09-29 10:56 RQuadling Note Added: 0002566
2013-09-29 10:56 RQuadling Status feedback => assigned
2013-10-14 00:46 derick Category Usage problems => Feature/Change request
2013-10-14 01:33 derick Note Added: 0002585
2013-10-14 01:33 derick Status assigned => closed
2013-10-14 01:33 derick Resolution open => fixed
2013-10-14 01:33 derick Fixed in Version => 2.3dev
2015-02-22 14:30 derick Fixed in Version 2.3dev => 2.3.0
2020-03-12 16:55 derick Severity minor => feature
2020-03-12 17:34 derick Category Feature/Change request => Tracing