In the recent versions of geth
, you can use the debug.traceTransaction(txid)
call to trace your transaction.
For example, here is a transaction sending some ethers to The DAO contract:
> debug.traceTransaction("0x8e5b38db03e0941677ba65275d78fe18df999c11a7be1921831082121ae73390")
...
}, {
depth: 1,
error: "",
gas: 96943,
gasCost: 3,
memory: ["000000000000000000000000b50a06ffe68c746fee498147481767f32ce16ea4", "0000000000000000000000000000000000000000000000000000000000000013", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000001"],
op: "SWAP1",
pc: 2422,
stack: ["00000000000000000000000000000000000000000000000000000000baac5300", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000020"],
storage: {
0000000000000000000000000000000000000000000000000000000000000016: "000000000000000000000000000000000000000000096d2c34d6cb6b944ab9e8",
8913b768e65415e14d5815e774a6dc351fe0f40ad272540c08c8e6a86fa6ae77: "00000000000000000000000000000000000000000000000402bf8582bb468000",
eb8d4c8dfc1d31afefdf4361baf3da7164a6863a3e14531b2faef246b93c97bb: "000000000000000000000000000000000000000000000002ac7fae5727845554"
}
}, {
depth: 1,
error: "",
gas: 96943,
gasCost: 0,
memory: ["000000000000000000000000b50a06ffe68c746fee498147481767f32ce16ea4", "0000000000000000000000000000000000000000000000000000000000000013", "0000000000000000000000000000000000000000000000000000000000000060", "0000000000000000000000000000000000000000000000000000000000000001"],
op: "RETURN",
pc: 2423,
stack: ["00000000000000000000000000000000000000000000000000000000baac5300", "0000000000000000000000000000000000000000000000000000000000000020", "0000000000000000000000000000000000000000000000000000000000000060"],
storage: {
0000000000000000000000000000000000000000000000000000000000000016: "000000000000000000000000000000000000000000096d2c34d6cb6b944ab9e8",
8913b768e65415e14d5815e774a6dc351fe0f40ad272540c08c8e6a86fa6ae77: "00000000000000000000000000000000000000000000000402bf8582bb468000",
eb8d4c8dfc1d31afefdf4361baf3da7164a6863a3e14531b2faef246b93c97bb: "000000000000000000000000000000000000000000000002ac7fae5727845554"
}
}]
You can see the same tracing information in the VM-Trace tab in https://live.ether.camp .
EDIT: You will find more debugging functions in Management APIs, including: