 
 # For the Renderer Processes
 class DebugRenderer extends DebugBase
-  style = 'background: linear-gradient(30deg, cyan, white 5ex)'
-  _log: (msg = '', obj = null) ->
-    txt = "%c[DEBUG] #{msg}"
-    if obj? then console.debug txt, style, obj else console.debug txt, style
+  style = 'background: linear-gradient(30deg, cyan, white 3ex)'
+  constructor: ->
+    @_log = console.debug.bind console, '%c%s', style
 
   init: ->
     return Debug.wrap('Already initialized') if @isInitialized()


doNothing = -> return

# Extra Option Handler
class ExOptHandler
  Object.defineProperties @prototype,
    log:
      get: -> if @isEnabled() then @_log else doNothing

# Extra options container (just need the name)
class ExtraDebugOptions

# Base Implementation
class DebugBase
  setEnabled: (b) ->
    enabled = b
    Debug.wrap {enabled: b}


# For the Browser Process
class DebugBrowser extends DebugBase
  constructor: ->
    @_log = console.log.bind console, '[DEBUG] %s'.cyan

  init: ->
    return Debug.wrap('Already initialized') if @isInitialized()
