I did it with a link in the custom control:
<xp:link escape="true" id="link25" text="x">
<xp:eventHandler event="onclick" submit="true" refreshMode="partial" refreshId="debugToolbar" disableValidators="true">
<xp:this.action><![CDATA[#{javascript:dBar.clearScopeEntry(entry);}]]></xp:this.action></xp:eventHandler>
</xp:link>
Then I added the clearScopeEntry method to the class:
// ADDED BY Newbs 8-Mar-2012
//Clears the individual entry for the scope
clearScopeEntry : function(entry) {
var _v = null;
switch(sessionScope.debugToolbar.contentType) {
case "applicationScope":
_v = applicationScope;
break;
case "sessionScope":
_v = sessionScope;
break;
case "requestScope":
_v = requestScope;
break;
case "viewScope":
_v = viewScope;
break;
}
_v.remove(entry);
},