    def debug(
        self,
        *inputs,
        batch: bool = False,
        profiler: bool = False,
        tracer: bool = False,
        include: Union[List[str], str] = None,
        exclude: Union[List[str], str] = None
    ):
        """
        Run pipeline in debug mode.

        One can record the running time of each operator by setting `profiler` to `True`, or record the data of itermediate nodes
        by setting `tracer` to True. Note that one should at least specify one of `profiler` and `tracer` options to True.
        When debug with `tracer` option, one can specify which nodes to include or exclude.

        Args:
            batch (`bool):
                Whether to run in batch mode.
            profiler (`bool`):
                Whether to record the performance of the pipeline.
            tracer (`bool`):
                Whether to record the data from intermediate nodes.
            include (`Union[List[str], str]`):
                The nodes not to trace.
            exclude (`Union[List[str], str]`):
                The nodes to trace.
        """
        if not profiler and not tracer:
            e_msg = 'You should set at least one of `profiler` or `tracer` to `True` when debug.'
            engine_log.error(e_msg)
            raise ValueError(e_msg)

        trace_nodes = self._get_trace_nodes(include, exclude)
        trace_edges = self._get_trace_edges(trace_nodes)

        time_profilers = [] if profiler else None
        data_queues = [] if tracer else None

        if not batch:
            res, time_profilers, data_queues = self._call(*inputs, profiler=profiler, tracer=tracer, trace_edges=trace_edges)
        else:
            res, time_profilers, data_queues = self._batch(inputs[0], profiler=profiler, tracer=tracer, trace_edges=trace_edges)

        v = visualizers.Visualizer(
            result=res, time_profiler=time_profilers, data_queues=data_queues ,nodes=self._dag_repr.to_dict().get('nodes'), trace_nodes=trace_nodes
        )

        return v
Run pipeline in debug mode.

One can record the running time of each operator by setting `profiler` to `True`, or record the data of itermediate nodes
by setting `tracer` to True. Note that one should at least specify one of `profiler` and `tracer` options to True.
When debug with `tracer` option, one can specify which nodes to include or exclude.

Args:
batch (`bool):
Whether to run in batch mode.
profiler (`bool`):
Whether to record the performance of the pipeline.
tracer (`bool`):
Whether to record the data from intermediate nodes.
include (`Union[List[str], str]`):
The nodes not to trace.
exclude (`Union[List[str], str]`):
The nodes to trace.
towhee/runtime/runtime_pipeline.py