* @param port target port
* @param delegate delegate
* @return the debug element
*/
public static FlowElement debug(FlowElementInput port, LinePartProcessor delegate) {
FlowElementResolver resolver = createResolver(port.getDescription().getDataType(), delegate);
for (FlowElementOutput opposite : port.disconnectAll()) {
PortConnection.connect(opposite, resolver.getInput(PORT_IN));
}
PortConnection.connect(resolver.getOutput(PORT_OUT), port);
return resolver.getElement();
}