code: def add_debugging_flags(parser):
      from argparse import SUPPRESS
  
      # For detailed info see:
      # https://github.com/iterative/dvc/wiki/Debugging,-Profiling-and-Benchmarking-DVC
      args, _ = parser.parse_known_args()
      verbose = args.verbose
  
      def debug_help(msg):
          if verbose:
              return msg
          return SUPPRESS
  
      parser = parser.add_argument_group("debug options")
  
      parser.add_argument(
          "--cprofile",
          action="store_true",
          default=False,
          help=debug_help(
              "Generate cprofile data for tools like snakeviz / tuna"
          ),
      )
      parser.add_argument(
          "--cprofile-dump",
          help=debug_help("Location to dump cprofile file"),
      )
      parser.add_argument(
          "--yappi",
          action="store_true",
          default=False,
          help=debug_help(
              "Generate a callgrind file for use with tools like "
              "kcachegrind / qcachegrind"
          ),
      )
      parser.add_argument(
          "--yappi-separate-threads",
          action="store_true",
          default=False,
          help=debug_help("Generate one callgrind file per thread"),
      )
      parser.add_argument(
          "--viztracer",
          action="store_true",
          default=False,
          help=debug_help(
              "Generate a viztracer file for use with vizviewer"
          ),
      )
      parser.add_argument(
          "--viztracer-depth",
          type=int,
          help=debug_help("Set viztracer maximum stack depth"),
      )
      parser.add_argument(
          "--viztracer-async",
          action="store_true",
          default=False,
          help=debug_help("Treat async tasks as threads"),
      )
      parser.add_argument(
          "--pdb",
          action="store_true",
          default=False,
          help=debug_help(
              "Drop into the pdb/ipdb debugger on any exception"
          ),
      )
      parser.add_argument(
          "--instrument",
          action="store_true",
          default=False,
          help=debug_help("Use pyinstrument CLI profiler"),
      )
      parser.add_argument(
          "--instrument-open",
          action="store_true",
          default=False,
          help=debug_help("Use pyinstrument web profiler"),
      )
      parser.add_argument(
          "--show-stack",
          "--ss",
          action="store_true",
          default=False,
          help=debug_help(
              r"Use Ctrl+T on macOS or Ctrl+\ on Linux to print the stack "
              "frame currently executing. Unavailable on Windows."
          ),
      )
  
file_path: dvc/dvc/_debug.py
imports: from contextlib import ExitStack, contextmanager
  from datetime import datetime
  from typing import TYPE_CHECKING, Callable, Optional, Union
label_desc: Use image node_id 10 for calling a global function with example usage: add_debugging_flags(parser) and returns: SUPPRESS, msg