Advanced Debug Mode

by mnaoumov
5
4
3
2
1
Score: 60/100

Description

Category: Coding & Technical Tools

The Advanced Debug Mode plugin extends Obsidian's native debugging capabilities by enabling easier toggling of debug mode and preserving detailed, long stack traces, even for asynchronous operations. It enhances error visibility, helping users trace complex execution flows across timers, promises, and events. The plugin also introduces DevTools access for mobile users, enables easier management of debug namespaces, and provides the ability to disable timeouts during long debugging sessions.

Reviews

No reviews yet.

Stats

34
stars
6,560
downloads
0
forks
519
days
1
days
25
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
2
total issues
0
open issues
2
closed issues
277
commits

Latest Version

25 days ago

Changelog

  • feat: surface the shared abort controller as a command and a settings button
  • chore: update libs
  • fix(build): wire build:compile to buildCompile and drop the duplicate leaf script

Full Changelog: https://github.com/mnaoumov/obsidian-advanced-debug-mode/compare/1.10.9...1.11.0

README file from

Github

Advanced Debug Mode

Buy Me a Coffee GitHub release GitHub downloads Coverage: 100%

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.

Demo vault

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:

  1. Running the Advanced Debug Mode: Open demo vault command.
  2. Downloading advanced-debug-mode-demo-vault.zip from the Releases. It unzips into a single advanced-debug-mode-demo-vault-<version> folder.
  3. Browsing its source in demo-vault/ in this repository.

What it does

  • Obsidian's own debug mode, toggled from a command instead of the console. 01 Debug mode
  • Long stack traces — the frames behind a callback boundary, kept rather than discarded. 02 Long stack traces
  • Async long stack traces — the same across await, opt-in because it is desktop-only and costs DevTools console autocompletion while enabled. 03 Async long stack traces
  • Timeouts that do not fire while you are on a breakpoint, so a slow debugging session does not trip Obsidian's own long-running-task limits. 04 Long running tasks
  • DevTools on mobile, where the app has none, plus a UI for the debug library's namespaces. 05 More debug tools
  • A panic button for a runaway operation — the app-wide shared abort, as a hotkey-bindable command and a settings button instead of a line typed into the console. 05 More debug tools
  • Every setting, by the key it is stored under. 06 Settings

Installation

The plugin is available in the official Community Plugins repository.

Beta versions

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:

  1. Ensure you have the BRAT plugin installed and enabled.
  2. Click Install via BRAT.
  3. An Obsidian pop-up window should appear. In the window, click the Add plugin button once and wait a few seconds for the plugin to install.

Debugging

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.

Changelog

All notable changes to this project will be documented in the CHANGELOG.

Contributing

Contributions are welcome — see CONTRIBUTING to get set up.

Support

My other Obsidian resources

See my other Obsidian resources.

License

© Michael Naumov

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.