|
| 1 | +# Debugging User Operations |
| 2 | + |
| 3 | +When debugging user operations, Pimlico provides powerful tools to help you identify and resolve issues quickly. This guide covers the essential debugging techniques using request logs and the debugging section. |
| 4 | + |
| 5 | +## Using Request Logs |
| 6 | + |
| 7 | +Request logs provide detailed insights into every API call made to Pimlico's infrastructure, helping you trace and troubleshoot user operations effectively. |
| 8 | + |
| 9 | +### Accessing Request Logs |
| 10 | + |
| 11 | +Navigate to the **Request Logs** section in the left sidebar of your Pimlico dashboard. This displays a comprehensive list of all recent requests made using your API keys. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +### Filtering Requests |
| 16 | + |
| 17 | +The request logs interface provides powerful filtering options to help you quickly find the specific requests you're looking for: |
| 18 | + |
| 19 | +- **Date Range**: Narrow down requests to a specific time period using preset ranges like "Last 7 days" or define a custom date range. |
| 20 | + |
| 21 | +- **API Key**: If you have multiple API keys, select a specific one to view only its associated requests. |
| 22 | + |
| 23 | +- **Chain**: Filter by blockchain network to view only requests made on that chain (e.g., Base Sepolia, Ethereum Mainnet). |
| 24 | + |
| 25 | +- **Sender**: Enter a sender address to view all requests originating from a specific account. Particularly useful when debugging issues for a specific user. |
| 26 | + |
| 27 | +- **Method**: Filter by RPC method to see specific operation types (e.g., `eth_sendUserOperation`, `eth_estimateUserOperationGas`). |
| 28 | + |
| 29 | +- **Response Type**: Choose between "Success" or "Error" to view only successful operations or failed ones. |
| 30 | + |
| 31 | +- **Trace ID**: Search by a specific trace ID from an error log or previous debugging session to jump directly to that request. |
| 32 | + |
| 33 | +### Common Debugging Scenarios |
| 34 | + |
| 35 | +**Failed User Operations** |
| 36 | + |
| 37 | +To investigate failed user operations: |
| 38 | +1. Set Response Type to "Error" |
| 39 | +2. Filter by Method: `eth_sendUserOperation` |
| 40 | +3. Select the relevant time period |
| 41 | + |
| 42 | +This shows all failed user operations with their error messages, helping identify patterns or specific issues. |
| 43 | + |
| 44 | +**Gas Estimation Issues** |
| 45 | + |
| 46 | +For gas estimation problems: |
| 47 | +1. Filter by Method: `eth_estimateUserOperationGas` |
| 48 | +2. Look for error responses |
| 49 | +3. Check request payloads to ensure correct parameters |
| 50 | + |
| 51 | +**Tracking Specific Operations** |
| 52 | + |
| 53 | +Use the trace ID to follow a user operation through its entire lifecycle, from estimation to execution. |
| 54 | + |
| 55 | + |
| 56 | +### Debugging Individual Requests |
| 57 | + |
| 58 | +Once you've located the request you want to investigate, click the **debug icon** (bug symbol) next to any request entry to access detailed debugging information. |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +The debugging page opens with all request details automatically populated, including user operation, entrypoint, chain, timestamp and type of request, e.g `eth_sendUserOperation`, `eth_estimateUserOperationGas`: |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | +Click on the "Debug using Tenderly" will then redirect you to Tenderly's simulation link. |
| 67 | + |
| 68 | +## Using the Debugging Section |
| 69 | + |
| 70 | +The debugging section can be accessed in two ways: |
| 71 | + |
| 72 | +1. **From Request Logs**: As shown above, clicking the debug icon next to any request automatically populates all details |
| 73 | +2. **Direct Access**: Navigate to **Debugging → Simulate** in the left sidebar to manually enter information for custom debugging |
| 74 | + |
| 75 | +When accessing the debugging section directly, you can manually input operation details for custom debugging scenarios: |
| 76 | + |
| 77 | +- **User Operation**: Paste the complete user operation object or hash |
| 78 | +- **Entry Point**: Specify the entry point contract address (defaults to standard ERC-4337 entry points) |
| 79 | +- **Chain**: Select the blockchain network where the operation was/will be executed |
| 80 | +- **Timestamp**: Optionally provide a specific block timestamp for historical debugging |
| 81 | + |
| 82 | + |
| 83 | +Once your operation details are loaded (either automatically or manually), you can |
| 84 | +click on the "Debug using Tenderly" which will then redirect you to Tenderly's simulation link. |
| 85 | + |
| 86 | + |
0 commit comments