#debugging #dbg

wasm-rs-dbg

dbg! macro for WebAssembly environment

3 releases

0.1.2 Feb 20, 2021
0.1.1 Feb 20, 2021
0.1.0 Feb 5, 2021

#1091 in WebAssembly

Download history 11327/week @ 2025-10-22 6745/week @ 2025-10-29 4379/week @ 2025-11-05 1467/week @ 2025-11-12 1642/week @ 2025-11-19 184/week @ 2025-11-26 1710/week @ 2025-12-03 902/week @ 2025-12-10 236/week @ 2025-12-17 1080/week @ 2025-12-24 935/week @ 2025-12-31 952/week @ 2026-01-07 2324/week @ 2026-01-14 690/week @ 2026-01-21 1546/week @ 2026-01-28 3400/week @ 2026-02-04

8,745 downloads per month
Used in 6 crates (3 directly)

MIT/Apache

9KB
56 lines

dbg! for wasm32

Crate API Chat

This micro-crate provides a drop-in replacement for std::dbg macro that logs to console when compiled for wasm32-unknown-unknown and falls back to std::dbg on all other platforms.

Usage

Include this dependency in your Cargo.toml:

[dependencies]
wasm-rs-dbg = "0.1.2"

Then, in files where you want to use WebAssembly-enabled logging to console, use this import:

use wasm_rs_dbg::dbg;

License

Licensed under either of

Dependencies

~0–2.2MB
~41K SLoC