the debug plugin has a thread now
make main routines readable from the plugin
debug plugin uses cuses