View Issue Details

IDProjectCategoryView StatusLast Update
0001904XdebugProfilingpublic2020-12-11 08:27
Reporterlaurin1 Assigned Toderick  
Status closedResolutionfixed 
Product Version3.0.0 
Target Version3.0devFixed in Version3.0.1 
Summary0001904: Profile and trace files using %t or %u do not get the right names

I have not tested them all, but I know this works with :


But does not work with this:


Steps To Reproduce

Modify php.ini to enable profiler and configure this value:


Additional Information

The rest of the xdebug settings that I am using:


TagsNo tags attached.
Operating SystemWindows 10 x64 20H1
PHP Version7.4.10-7.4.19


has duplicate 0001913 closedderick profiler_output_name timestamps are now in a different, less file-friendly, format. 



2020-12-01 15:44

reporter   ~0005559

Kind of a big deal for us, as we don't want the same file used every time - we use %t to create a separate file for each request.


2020-12-01 15:45

reporter   ~0005560

Also, not working for %u.


2020-12-01 15:50

reporter   ~0005561

%r works, so we can use that for now and then use file modification date to determining timing.


2020-12-03 13:43

administrator   ~0005567

The root cause is that the %t and %u modifiers created file names in the form of '/tmp/cachegrind.out._tmp_foo_php.2020-12-02 18:19:57_081116' ­— instead of using the epoch seconds, it did create a textual string. Because on Windows you can't have files with ":" in it, it then failed to create the file.

I am curious to know though whether the log file (which you have commented out) would included a warning about not being able to create the file. Could you have a look at that please, by making sure your php.ini has "xdebug.log=c:\xdebug.log" and then running:

php -r 'xdebug_info();'

The log file should contain a warning, and the output of the script that you ran as well (it might scroll of your screen).


2020-12-03 15:17

administrator   ~0005568

This is now fixed in the Git repository through — I'm still interested in the output in the log, if there is any.

Issue History

Date Modified Username Field Change
2020-12-01 15:41 laurin1 New Issue
2020-12-01 15:44 laurin1 Note Added: 0005559
2020-12-01 15:45 laurin1 Note Added: 0005560
2020-12-01 15:50 laurin1 Note Added: 0005561
2020-12-03 13:43 derick Status new => assigned
2020-12-03 13:43 derick Target Version => 3.0dev
2020-12-03 13:43 derick Summary Profiler does not work when xdebug.profiler_output_name has a value set using %t (timestamp (seconds)) => Profile and trace files using %t or %u do not get the right names
2020-12-03 13:43 derick Note Added: 0005567
2020-12-03 15:17 derick Assigned To => derick
2020-12-03 15:17 derick Status assigned => closed
2020-12-03 15:17 derick Resolution open => fixed
2020-12-03 15:17 derick Fixed in Version => 3.0.1
2020-12-03 15:17 derick Note Added: 0005568
2020-12-11 08:27 derick Relationship added has duplicate 0001913