> ## Documentation Index
> Fetch the complete documentation index at: https://companyname-a7d5b98e-ton-storage.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Retracer

export const Image = ({src, darkSrc, alt = "", darkAlt, href, target, height = 342, width = 608}) => {
  const isSVG = src.match(/\.svg(?:[#?].*?)?$/i) !== null;
  const shouldInvert = isSVG && !darkSrc;
  const shouldCreateLink = href !== undefined;
  const minPx = 9;
  const maxPx = 608;
  const expectedPx = `a number or a string with a number that is greater than ${minPx - 1} and less than or equal to ${maxPx}`;
  const createInvalidPropCallout = (title, received, expected) => {
    return <Danger>
        <span className="font-bold">
          Invalid <code>{title.toString()}</code> passed!
        </span>
        <br />
        <span className="font-bold">Received: </span>
        {received.toString()}
        <br />
        <span className="font-bold">Expected: </span>
        {expected.toString()}
        {}
      </Danger>;
  };
  const checkValidDimensionValue = value => {
    switch (typeof value) {
      case "string":
      case "number":
        const num = Number(value);
        return Number.isSafeInteger(num) && num >= minPx && num <= maxPx;
      default:
        return false;
    }
  };
  let callouts = [];
  if (height && !checkValidDimensionValue(height)) {
    callouts.push(createInvalidPropCallout("height", height, expectedPx));
  }
  if (width && !checkValidDimensionValue(width)) {
    callouts.push(createInvalidPropCallout("width", width, expectedPx));
  }
  if (callouts.length !== 0) {
    return callouts;
  }
  const heightPx = Number(height);
  const widthPx = Number(width);
  const images = <>
      <img className="block dark:hidden" src={src} alt={alt} {...height && ({
    height: heightPx
  })} {...width && ({
    width: widthPx
  })} {...(shouldCreateLink || shouldInvert) && ({
    noZoom: "true"
  })} />
      <img className={`hidden dark:block ${shouldInvert ? "invert" : ""}`} src={darkSrc ?? src} alt={darkAlt ?? alt} {...height && ({
    height: heightPx
  })} {...width && ({
    width: widthPx
  })} {...(shouldCreateLink || shouldInvert) && ({
    noZoom: "true"
  })} />
    </>;
  if (shouldCreateLink) {
    return <a href={href} target={target ?? "_self"}>
        {images}
      </a>;
  }
  return images;
};

[Retracer](https://retracer.ton.org/) is a classic TVM transaction tracing tool that provides detailed inspection of transaction execution. It's useful for:

* Understanding complex transaction flows;
* Debugging smart contract behavior;
* Analyzing gas usage and performance.

Some explorers display links to Retracer on their transaction pages. Otherwise it's recommended to use a more modern [TxTracer](/tvm/tools/txtracer) tool.

Its source code can be found on [GitHub](https://github.com/ton-blockchain/tvm-web-viewer/).

<Image src="/resources/images/retracer.png" darkSrc="/resources/images/retracer.png" alt="Retracer screenshot" />

On this screenshot, key elements of its interface are visible:

* Transaction details — Sender, contract, amounts, time, LT, fees, and balances;
* **C5** button — Display action list: complete details of all actions performed during the transaction;
* **Logs** button — Detailed logs for deeper debugging;
* List of instructions (on the left) — Steps taken by execution of the contract on TVM;
* Stack (on the right) — Stack during execution of current instruction.
