Skip to main content
1 of 2
Taliesin Beynon
  • 10.7k
  • 46
  • 52

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, and Attributes of a symbol.
  • Most pathological kinds of StandardForm are avoided, so that Image, Graphics, Row, Column, SparseArray, etc. will show up as code, not UI elements. This is achieved via the PlainForm and CodeForm wrappers, which can also be found in GeneralUtilities` .
  • 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:

enter image description here

Taliesin Beynon
  • 10.7k
  • 46
  • 52