https://github.com/eroydev/anchor-lldb
https://github.com/eroydev/anchor-lldb
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/eroydev/anchor-lldb
- Owner: ERoydev
- License: other
- Created: 2025-06-23T10:47:10.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-30T07:43:06.000Z (12 months ago)
- Last Synced: 2025-07-27T06:34:47.221Z (11 months ago)
- Language: Rust
- Size: 310 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Anchor Debug Wrapper Generator
- Generates a standalone Rust crate that lets you simulate and debug program instructions without deploying to Solana.
---
## It scaffolds a standalone Rust crate with:
- `main.rs`: runs all instructions with mock accounts and test data
- `mock.rs`: mocks for system program, signers, and PDAs
- `Cargo.toml`: links to your Anchor crate via local path + package name
---
# Why?
- Easily simulate and debug instructions locally without deploying to Solana.
- Quickly iterate on instruction logic, argument setup, and PDA derivation.
- No need for a local validator or on-chain deployment.
- Get the package name from `your_project_name/programs/your_project_name/Cargo.toml`
---
# Usage:
```bash
anchor-lldb generate --package=
```
# Anchor account debugging in LLDB
1. View the pointer to the account
```lldb
p shipment
```
3. Dereference the pointer to see the actual struct fields
```lldb
p *shipment
```