@algorandfoundation/algokit-utils-debug • Docs
@algorandfoundation/algokit-utils-debug / writeAVMDebugTrace
writeAVMDebugTrace(
input
,bufferSizeMb
):Promise
<void
>
Generates an AVM debug trace from the provided simulation response and persists it to a file.
• input: AVMTracesEventData
The AVMTracesEventData containing the simulation response and other relevant information.
• bufferSizeMb: number
Promise
<void
>
An object containing the output file path and the trace content as a string.
const eventData: AVMTracesEventData = {
simulateResponse: // ... simulation response object
};
const result = await writeAVMDebugTrace(eventData);
console.log(`Debug trace saved to: ${result.outputPath}`);
console.log(`Trace content: ${result.traceContent}`);