Source Debugger
View calls, source code, call stacks, and variables in one workspace.
Source Debugger helps you continue investigating a specific contract call. It does not replay the transaction; it puts the existing Trace, source, and variables together so you can confirm what happened at that step.
Get to know the workspace
Debugger has a few key areas:
| Area | What it is for |
|---|---|
| Execution Trace | Select a call and see where it sits in the transaction. |
| Sources | Browse source files available for the transaction. |
| Editors | Open the source location for the selected call. |
| Call Stack | See which parent calls led to this call. |
| Information | Check call inputs, outputs, and contract variables. |
Select a call in Execution Trace first. When source is available, Editors opens the matching file. Use Call Stack and Information to verify its context. If source is unavailable, switch to Bytecode Mode to inspect instructions, Stack, Memory, and Storage.
Follow an example
The example below reuses the Debugger workspace with local Trace and source fixtures. Follow these steps:
Select the flash callback in Trace.
2Read the sourceSee what this call does in order.
3Check the contextVerify it with Call Stack and Information.
4Continue tracingFollow the staking, swap, and unwrap calls.
Find the callback
Expand UniswapV3Pool.flash(...) and select uniswapV3FlashCallback(...). Confirm that the Pool is the From address and the intermediate contract is the To address.
Read the source
After selection, Editors opens XPepeExploit.sol. This step stakes and withdraws, swaps for WETH, then sends out ETH.
Check the context
In Call Stack, confirm flash → uniswapV3FlashCallback. In Information, check the inputs for this call.
Continue tracing
Continue with TokenStaker.stake(...), withdrawAll(), Pool.swap(...), and WETH.withdraw(...) to understand the order of staking, swapping, and unwrapping. Finally, use State Changes to confirm the state that was actually written.
Notes
- Source locations depend on verified source, compiler information, and Source Maps. When they are unavailable, Trace, parameters, and raw data remain useful.
- Call Stack shows nesting; use Execution Trace for the order of sibling calls.
- Source Debugger explains execution. Use Balance Changes or Token Flow for the final asset outcome.
