   WatchPane = () ->
     state = builder3.root()
     refresh = () -> TreeView.populate(state)
-    _debugger.onBreak () =>
-        refresh()
+    listeners.push _debugger.onBreak () -> refresh()
     return state
 
   WatchPane.render = (state) ->

{TreeView, TreeViewItem, TreeViewUtils} = require './TreeView'
hg = require 'mercury'
fs = require 'fs'
{EventEmitter} = require 'events'
{h} = hg
FocusHook = require('./focus-hook');

#######################################

removeBreakListener = null

log = (msg) -> #console.log(msg)



  CallStackPane = () ->
    state = builder.root()
    listeners.push _debugger.onBreak () ->
      log "Debugger.break"
      TreeView.reset(state)
      eventEmitter.emit('frame-selected', null)
