Overview:

This vmddebug plugin provides a frontend to debugging and tracing facilities for VMD. To activate the plugin, you have to require it from the VMD console prompt. This will add a new command, debug, to the Tcl interpreter that acts as interface to all included debug and tracing funtionality.

The general syntax is:

  debug subcommand argument [more arguments]

Currently only one subcommand, atomselect, is supported.

atomselect:

A debug tool to monitor allocation and usage of atom selection function created through Tcl scripting. Its most important use is help finding "selection leaks", i.e. when selections are created, but not correspondingly deleted. This happens most commonly when atom selections are created inside a loop or not assigned to a variable for bookkeeping and later deletion.

Automatic deletion of atom selections

VMD employs a special Tcl construct to give atom selections only local scope, i.e. the atom selection is tied to a local variable and automatically deleted, when that variable goes out of scope. However, this construct does not help when atom selections are created on the top level (e.g. on the VMD console) or when new selections are created inside a (nested) loop of a procedure where the storage required for all created atom selections becomes too large before it goes out of scope. The deleting atom selections explicitly is therefore strongly recommended and the debug atomselect tool will print a warning whenever an atomselection is automatically deleted through the local variable tie.

Usage: debug atomselect <flag>

Available flags:
  on      : enable tracing of atom selections
  off     : disable tracing of atom selections
  verbose : verbosely report atomselect operations
  silent  : don't report atomselect operations
  stats   : print statistics (active/added/deleted)
  help    : print this message