Type Definition
Object representing Solidity source map that maps bytecode positions to source code locations.Quick Reference
- Parse
- Lookup
API Methods
Constructors
from(raw)- Create from source map stringparse(raw)- Parse source map string
Access
getEntryAt(map, pc)- Get entry at bytecode positiontoEntries(raw)- Convert string to entry array
Conversion
toString(map)- Convert to compressed string format
Usage Patterns
Debugging Contract Execution
Error Location Mapping
Coverage Analysis
Source Map Format
Solidity source maps use semicolon-separated entries:s: Start byte offset in sourcel: Length in bytesf: File index (0-based)j: Jump type (i= into,o= out,-= regular)m: Modifier depth (optional)
Compression
Empty fields inherit from previous entry:i.
Jump Types
-: Regular instruction (no jump)i: Jump into function/modifier (JUMP)o: Jump out of function/modifier (return)
Related
- Bytecode - Bytecode analysis
- Metadata - Compiler metadata
- ContractCode - Deployed bytecode
Specification
- Solidity Source Mappings - Official format documentation
- Remix Debugger - Example usage

