   eventEmitter = new EventEmitter()
 
   builder =
-    # helper: move to debugger?
     loadProperties: (ref) ->
       log "builder.loadProperties #{ref}"
       _debugger

        when 'function'
          TreeViewItem("#{name} : function() { ... }", handlers: handlers)
        when 'object'
          decorate = (title) -> (state) -> if state.isOpen then title else "#{title} { ... }"
          ref = value.value.ref || value.value.handle
          TreeView(decorate("#{name} : #{className}"), (() => builder.loadProperties(ref).map(builder.property)), handlers: handlers)

    frame: (frame) ->
      log "builder.frame #{frame.script.name}, #{frame.script.line}"


exports.cleanup = () ->
  for remove in listeners
    remove()
