Bug #19262
closed
debug_trail gives not filename
Added by Franz Holzinger about 16 years ago.
Updated about 6 years ago.
Description
If you call t3lib_div::debug_trail (...) then you get info about the class and methodname. The linenumber inside of a file is given. But now you still do not know in which file to find the place from where it has been called from. This requires a complicated search. You will need the filename and not the classname.
It would be better to have the filename listed here. You can easily find the file by its name. To have a shorter display no path is required.
(issue imported from #M9246)
Files
Here is an example of the given debug output:
debug_backtrace SC_db_list->main#451 // recordList->generateList#295 // localRecordList->getTable#268 // ux_t3lib_DB->exec_SELECT_queryArray#400 // ux_t3lib_DB->exec_SELECTquery#272 // ux_t3lib_DB->myDebug#210
You can see, that the line numbers are misleading.
recordList->generateList is called on line #295 in the file which contains the class SC_db_list.
- Status changed from New to Needs Feedback
- Target version deleted (
0)
The issue is very old, does this issue exists in newer versions of TYPO3 CMS (4.5 or 6.1)?
You have still the same problem in TYPO3 6.0.
typo3/sysext/core/Classes/Utility/DebugUtility.php
static public function debugTrail() {
...
$pathFragment = $dat['class'] . $dat['type'] . $dat['function'];
}
The file name is still missing.
- Status changed from Needs Feedback to New
- Status changed from New to Needs Feedback
- Is Regression set to No
Hey Franz,
with the new namespaces logic inside TYPO3 would you still consider this a problem?
Please also keep in mind that IDEs like PHPStorm offer "Open by Classname" functions.
- Assignee set to Mathias Schreiber
This won't be a problem with namespaces. The namespace will help to find the path to the file which you need.
However it would be nice, if you could make this configurable in a global constant.
- Category set to Logging
- Status changed from Needs Feedback to New
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Closed
Also available in: Atom
PDF