Interface Debugger
public interface Debugger
An abstract interface for extended debugging.
Created by covers1624 on 15/9/25.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionGenerate a GraphViz Dot graph string for the givenControlFlowNodegraph.Generate a GraphViz Dot graph string for the givenVariableLivenessGraph.voidstartDebugger(String ipAndPort, ClassResolver resolver) Start an interactive http based web debugger.static voidtryIfPresent(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.voidwriteControlFlowGraph(ControlFlowNode cfNode, Path dest) Generate a GraphViz png for the givenControlFlowNodegraph.voidwriteVariableLivenessGraph(VariableLivenessGraph vlGraph, Path dest) Generate a GraphViz png for the givenVariableLivenessGraph.
-
Field Details
-
DEBUGGER
A static instance of the debugger, if available.
-
-
Method Details
-
writeControlFlowGraph
Generate a GraphViz png for the givenControlFlowNodegraph.- 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
Generate a GraphViz Dot graph string for the givenControlFlowNodegraph.- Parameters:
cfNode- The node to generate the graph for.- Returns:
- The Dot graph string.
-
writeVariableLivenessGraph
Generate a GraphViz png for the givenVariableLivenessGraph.- Parameters:
vlGraph- The variable liveness graph.dest- The file to write to.- Throws:
IOException- Any IO exception whilst generating or writing the graph.
-
buildVariableLivenessGraphDot
Generate a GraphViz Dot graph string for the givenVariableLivenessGraph.- Parameters:
vlGraph- The variable liveness graph.- Returns:
- The Dot graph string.
-
startDebugger
Start an interactive http based web debugger.- Parameters:
ipAndPort- The ip and port to bind to.resolver- TheClassResolverto 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.
-