Skip to content

Latest commit

 

History

History
41 lines (24 loc) · 1.07 KB

writeAVMDebugTrace.md

File metadata and controls

41 lines (24 loc) · 1.07 KB

@algorandfoundation/algokit-utils-debugDocs


@algorandfoundation/algokit-utils-debug / writeAVMDebugTrace

Function: writeAVMDebugTrace()

writeAVMDebugTrace(input, bufferSizeMb): Promise<void>

Generates an AVM debug trace from the provided simulation response and persists it to a file.

Parameters

input: AVMTracesEventData

The AVMTracesEventData containing the simulation response and other relevant information.

bufferSizeMb: number

Returns

Promise<void>

An object containing the output file path and the trace content as a string.

Example

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}`);

Defined in

debugging/writeAVMDebugTrace.ts:85