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

    • writeControlFlowGraph

      void writeControlFlowGraph(ControlFlowNode cfNode, Path dest) throws IOException
      Generate a GraphViz png for the given ControlFlowNode graph.
      Parameters:
      cfNode - The node to generate the graph for.
      dest - The file to write to.
      Throws:
      IOException - Any IO exception whilst generating or writing the graph.
    • 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.
    • writeVariableLivenessGraph

      void writeVariableLivenessGraph(VariableLivenessGraph vlGraph, Path dest) throws IOException
      Generate a GraphViz png for the given VariableLivenessGraph.
      Parameters:
      vlGraph - The variable liveness graph.
      dest - The file to write to.
      Throws:
      IOException - Any IO exception whilst generating or writing the graph.
    • 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, ClassResolver resolver)
      Start an interactive http based web debugger.
      Parameters:
      ipAndPort - The ip and port to bind to.
      resolver - The ClassResolver to use for target, library, and jdk information.
    • 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.