Add SCRIPT_DEBUG functionality to core class