       Object.assign new Debug, o
     else
       o
-
-# Another wrapper
-class Handler
-  constructor: (@enabled, @type) ->
 
 # Globals
 console.assert process, "process doesn't exist"

        toString:
          value: -> "[#{tag}: #{if @isEnabled() then 'enabled' else 'disabled'}]"
    @ex[tag]
  list: ->
    output = Debug.wrap {debug: new Handler(@isEnabled(), 'main')}
    for opt of @ex
      output[opt] = new Handler(@ex[opt].isEnabled(), 'extra')
    console.table output
    output

  Object.defineProperty @prototype, 'ex',
    value: new ExtraDebugOptions

    process.env.DEBUG_EXTRA?.split(',').forEach @enableExtra.bind @
    super()

  list: ->
    relist = @list.bind @
    output = new DevToolsBooster
    output['DEBUG'] = new Booster(@, 'main', relist)
    for opt of @ex
      output[opt] = new Booster(@ex[opt], 'extra', relist)
    console.table output

dbg = if isRenderer then new DebugRenderer else new DebugBrowser

module.exports = dbg
