Motoko Debugger is a debugging tool specifically built for the Motoko language. It helps developers debug Motoko smart contracts running inside Wasm-based canister containers on the Internet Computer (ICP). This project provides a developer-friendly interface for inspecting execution state, variables, breakpoints, and more—bridging the gap between Motoko and low-level WebAssembly debugging.
- 🔧 Motoko-specific: Built from the ground up for Motoko’s actor model and async runtime.
- 🐛 Native Wasm debugging: Supports DWARF debugging info for accurate source mapping.
- 💻 Cross-platform support: CLI debugger for Linux and macOS.
- 🧩 VSCode integration: One-click debugging from Visual Studio Code (planned).
- 🌐 Web IDE support: Planned integration with the Motoko online IDE.
- Step-by-step execution (step in/step over/step out)
- Breakpoint setting and management
- Variable and memory inspection
- Call stack viewing
- Source-level mapping from Wasm with DWARF
- Async actor operation awareness (planned)
⚠️ Early-stage development. Currently supports Linux/macOS. Windows not supported due to Motoko compiler limitations.
- Motoko compiler with DWARF output support
- Rust + Cargo
# Clone the repo
git clone https://github.com/scalebit-labs/motoko-debugger.git
cd motoko-debugger
# Build the debugger core
cargo build --release./motoko-debugger target/canister.wasmDocumentation and usage examples are coming soon in the
docs/folder.
We are a security and infrastructure-focused Web3 team. Our previous work includes:
-
MoveScanner: A high-performance Move smart contract analyzer (ISSTA 2024 paper).
- Detected 97,169 issues across 37,302 contracts on Aptos & Sui.
-
ZkScanner: Static analyzer for Circom and Halo2 ZK circuits.
- sui-move-analyzer: VSCode plugin for Sui Move.
- aptos-move-analyzer: VSCode plugin for Aptos Move.
- Move Formatter: Now part of the official
aptos-cli. - BitsLabIDE: Browser-based Move IDE with Wasm-native compilation and deployment.
Motoko contracts are rapidly growing in the ICP ecosystem, with thousands of GitHub repositories and active developer communities on Discord and Twitter. However, a usable, Motoko-specific debugging tool is still missing. This project fills a crucial gap in the developer toolchain for ICP smart contracts.
- The Motoko compiler produces usable DWARF info.
- Developers have access to Linux/macOS development environments.
We welcome developers, contributors, and testers from the Motoko and broader ICP community.
- Star the repo ⭐
- File issues 🐞
- Submit PRs 🔧
- Join our discussions 💬
- Website: https://www.scalebit.xyz
- Twitter: @scalebit_xyz
- Blog: https://www.scalebit.xyz/blog
We’re building a critical piece of infrastructure for the future of Motoko and WebAssembly smart contracts. Your feedback and participation can shape its future.