---
layout: doc
title: general / dump_trace
---
# dump_trace

### NAME

    dump_trace() - return the current LPC call trace

### SYNOPSIS

    mixed array dump_trace();

### DESCRIPTION

    Returns the current LPC stack trace as an array of mappings.  Each
    mapping describes one frame in the call stack.

    Each frame contains these keys:

        "function"   the function name, or a frame marker such as "CATCH"
        "program"    the program filename
        "object"     the object for the frame
        "file"       the source filename
        "line"       the current source line

    Function frames may also contain:

        "arguments"  an array of argument values
        "locals"     an array of local variable values

    If no current program or call stack is available, an empty array is
    returned.

### SEE ALSO

    call_stack(3), error(3), trace_start(3), trace_end(3)
