Interface Debugger


public interface Debugger
An abstract interface for extended debugging.

Created by covers1624 on 15/9/25.

  • Field Details

    • DEBUGGER

      @Nullable static final @Nullable Debugger DEBUGGER
      A static instance of the debugger, if available.
  • Method Details

    • buildControlFlowGraphDot

      String buildControlFlowGraphDot(ControlFlowNode cfNode)
      Generate a GraphViz Dot graph string for the given ControlFlowNode graph.
      Parameters:
      cfNode - The node to generate the graph for.
      Returns:
      The Dot graph string.
    • buildVariableLivenessGraphDot

      String buildVariableLivenessGraphDot(VariableLivenessGraph vlGraph)
      Generate a GraphViz Dot graph string for the given VariableLivenessGraph.
      Parameters:
      vlGraph - The variable liveness graph.
      Returns:
      The Dot graph string.
    • startDebugger

      void startDebugger(String ipAndPort, @Nullable @Nullable Path jreRef, List<Path> libraries, Path input)
      Start an interactive http based web debugger.
      Parameters:
      ipAndPort - The ip and port to bind to.
      jreRef - The reference jre to use, or null to use the current jvm.
      libraries - The reference libraries to use.
      input - The input to target to use.
    • tryIfPresent

      static void tryIfPresent(net.covers1624.quack.util.SneakyUtils.ThrowingConsumer<Debugger,Throwable> action)
      Try to run the given action, if the debugger is available, fire the action with it. Otherwise, log the attempt and do nothing.
      Parameters:
      action - The action.