View Issue Details

IDProjectCategoryView StatusLast Update
0001323XdebugTracingpublic2020-03-12 16:54
Reportercalebbegly@gmail.com Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version2.4.0 
Target Version2.6.0Fixed in Version2.6.0alpha1 
Summary0001323: Add config option to enable full paths in trace output
Description

When an error occurs and the trace log is printed, only the name of the file is shown, not the full path. When working with some frameworks, it would be useful to have the full path displayed because not every php filename is unique.

I understand that if you mouse over the name, the title text shows the full path, which is useful for local testing. However when we have people on the testing servers, if they take a screenshot or copy and paste the error, the full path is not shown, and it can take a bit of work to find the error, especially if it is a hard to reproduce bug.

We would love another option for the traces (and potentially the filename shown by the var_dump output) that would allow us to turn this on on the testing servers. This is also one of the primary reasons several of the devs prefer the default php output over the xdebug output.

Suggestions for names:

xdebug.trace_full_path
xdebug.trace_max_path_length

Steps To Reproduce

Any error with auto_trace turned on.

TagsNo tags attached.
Operating System
PHP Version7.0.5-7.0.9

Activities

derick

2017-11-14 00:06

administrator   ~0004464

Hi!

Instead of having an xdebug.trace_full_path setting, what would you think of having a setting that allows you to configure the format of what it shows, similar to xdebug.trace_output_name (https://xdebug.org/docs/all_settings#trace_output_name)?

I can imagine the following options:

%n — just the file name ("mta.php") (n for name)
%p — directory name + file name ("transport/mta.php") (p for parent)
%a — 2 directory names + file name ("mail/transport/mta.php") (a for ancestor)
%f — full path ("/var/www/vendor/mail/transport/mta.php")

With the default being ".../%n", like it is now.

cheers,
Derick

derick

2017-11-19 13:03

administrator   ~0004471

There is now a new setting: xdebug.filename_format, which you can use akin to xdebug.file_link_format with the following formatting chars:

%n — just the file name ("mta.php") (n for name)
%p — directory name + file name ("transport/mta.php") (p for parent)
%a — 2 directory names + file name ("mail/transport/mta.php") (a for ancestor)
%f — full path ("/var/www/vendor/mail/transport/mta.php")
%s — slash according to your platform (/ or ).

Issue History

Date Modified Username Field Change
2016-06-27 16:54 calebbegly@gmail.com New Issue
2016-12-11 23:33 derick Status new => confirmed
2016-12-11 23:33 derick Target Version => 2.6.0dev
2017-11-14 00:06 derick Note Added: 0004464
2017-11-14 00:06 derick Assigned To => derick
2017-11-14 00:06 derick Status confirmed => feedback
2017-11-19 13:03 derick Note Added: 0004471
2017-11-19 13:03 derick Status feedback => closed
2017-11-19 13:03 derick Resolution open => fixed
2017-11-19 13:03 derick Fixed in Version => 2.6.0dev
2017-12-02 15:57 derick Fixed in Version 2.6.0dev => 2.6.0alpha1
2017-12-02 18:34 derick Target Version 2.6.0dev => 2.6.0alpha1
2017-12-02 18:36 derick Target Version 2.6.0alpha1 => 2.6.0
2020-03-12 16:54 derick Category Feature/Change request => Tracing