An error thrown inside a callback or an await arrives in the console with most of its stack already
gone: you get the frame that threw and almost nothing about who called it. Debugging a plugin in
Obsidian then means guessing, or littering the code with logging until the path
becomes obvious.
This plugin restores those frames. It keeps long stack traces across callback and async boundaries,
turns off the timeouts that fire while you sit on a breakpoint, brings DevTools to the mobile app, and
gives the debug namespaces a UI instead of hand-edited localStorage.
The documentation is a demo vault. Every feature has a note that explains what it does and why you would want it, with buttons that throw real errors so you can watch the traces yourself.
Start reading here — it is plain markdown, so it works on GitHub with nothing installed.
A copy of the vault ships with every release. You can access it via any of the following:
advanced-debug-mode-demo-vault-<version>.zip (<version> is the release version) from the Releases.demo-vault/ in this repository.await, opt-in because it is desktop-only and costs
DevTools console autocompletion while enabled.
03 Async long stack tracesdebug library's namespaces.
05 More debug toolsThe plugin is available in the official Community Plugins repository.
To install the latest beta release of this plugin (regardless if it is available in the official Community Plugins repository or not), follow these steps:
Add plugin button once and wait a few seconds for the plugin to install.Every other plugin documents a console command here. This one does not need to: turning debug
namespaces on and off is what it does. Open Settings -> Community plugins -> Advanced Debug Mode,
find the debug-namespaces section, and switch on advanced-debug-mode — or any other plugin's
namespace — without touching the console or localStorage. See
05 More debug tools.
The console form still works, and is the one to use if this plugin is not loaded yet, which is exactly when you would need it:
window.DEBUG.enable('advanced-debug-mode');
For more details, refer to the documentation.
All notable changes to this project will be documented in the CHANGELOG.
Contributions are welcome — see CONTRIBUTING to get set up.
See my other Obsidian resources.