add support of debug to widget