Internal Snooping (Introspection):
Guides | Debugging | Internals

Internal Snooping (Introspection)

Snooping around SuperCollider

You can inspect much of the internal structure of the class library and other data structures. This can be useful for research and debugging purposes.

NOTE: The keyboard shortcuts mentioned here only apply to the standard SuperCollider IDE.

Class Definitions, Implementations, and References

Look up Implementation

Selecting the name of any method (e.g. play) and then the menu item Language>Look up Implementation will open a window showing all implementations of that method and their arguments. Selecting one of those classes and methods (e.g. Sample:play) and typing enter will open the class definition at that method. Note that this only shows implementations, and does not indicate inheritance.

(see Keyboard Shortcuts)

Look up References

Selecting any text (e.g. Window or asStream) and then the menu item Language>Look up References will open a window showing all references to the selected text, i.e. each place it is used within the class library. Note that this will not find methods calls compiled with special byte codes like 'value'.

(see Keyboard Shortcuts)

Graphical Class browser

SC has a graphical Class browser which will show all methods, arguments, subclasses, instance variables and class variables. Using the browser's buttons you can easily navigate to the class' superclass, subclasses, class source, method source, helpfile (if there is one), check references or implementation of methods.

Snooping in Classes

Snooping in Methods

Snooping in GUI Windows

Snooping in SynthDefs

Snooping on the Server

Lots of information on server-related snooping can be found in the Server helpfile under "Information and debugging".

Some examples

Snooping in the Interpreter

When evaluating text in the interpreter, the variable 'this' always refers to the interpreter.