In version 10.1, I've built something like Spelunk into GeneralUtilities`
.
To use it, run
Needs["GeneralUtilities`"]
PrintDefinitions[symbol];
This will pop up a window that shows all definitions of symbol. Here is a short summary of features:
- The window shows code cells containing all
DownValues
,UpValues
,SubValues
, andAttributes
of a symbol. - Most pathological kinds of
StandardForm
are avoided, so thatImage
,Graphics
,Row
,Column
,SparseArray
, etc. will show up as code, not UI elements. This is achieved via thePlainForm
andCodeForm
wrappers, which can also be found inGeneralUtilities`
. - Hyperlinks are be injected as appropriate. Click on a hyperlinked symbol to print its definitions in a new window.
- The
CellContext
of each code cell is set to reduce the amount of clutter from fully qualified private symbols etc.
Here's a simple example of PrintDefinitions
running on itself: