IMHO, the Trace, Hold, and FullForm are three commands of Wolfram language to supply valuable debug/inspection information for a complicated expression. For example, the following command can be used to obtain the real path from the opened notebook itself :
"FileName" /. NotebookInformation[] /. _[{path__}, fileName_, __] :>
FileNameJoin@{path, fileName}
In order to understand the implications and working logic of the above code snippet, I try to run the following two commands in the same notebook:
"FileName" /. NotebookInformation[] /. _[{path__}, fileName_, __] :>
FileNameJoin@{path, fileName} // Trace
"FileName" /. NotebookInformation[] /. _[{path__}, fileName_, __] :>
FileNameJoin@{path, fileName} // Hold // FullForm
But the first command gives a lot of output information, while the second command gives an expression with many levels of nesting. All in all, they’re very unintuitive. More specifically, if I can tweak, tame, and combine all the information into a more intuitive and readable output format, their practical value will be greatly improved.
I wonder if anyone has this experience. Any tips/hints will be highly appreciated.
Regards,
HZ
trace-hold-fullform.nb (19.7 KB)