debug plugin functions