`setDebugMode` is not defined
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 21
- Avg merge
- 12h 14m
- Merged PRs (30d)
- 41
Description
`setDebugMode` is listed in `SYNC_METHODS` in `index.js`, but nothing backs it. There’s no Rust `set_debug_mode` method, no `js_name = "setDebugMode"`, and it never appears in the generated `.d.ts`. It also looks like the only occurrence of the identifier in the repo.
The name is misleading too: debug mode is only configurable at construction time via the `debugMode` argument (not something that can be done on runtime):
`createClient(..., debugMode) -> .in_debug_mode(...)`
We should look to remove the `setDebugMode` entry, and optionally extend the lint to also flag classified method names that do not match any WASM export. While I was looking at this: the `debugMode` behavior should also be documented on the web-client side: what enabling it actually does, namely surfacing `debug.*` MASM output from executed scripts, and where that output goes in browser vs node builds.
Contributor guide
Research direction
Look at index.js to find the SYNC_METHODS array and remove the 'setDebugMode' entry. Check if there is a lint rule that can be extended to catch mismatched method names. Also, document the debugMode behavior in the web-client documentation, explaining what enabling it does and where debug output appears.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, typescript, wasm
- Domain
- documentation, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100