mirror of
https://github.com/mnaoumov/obsidian-advanced-debug-mode.git
synced 2026-07-22 05:44:00 +00:00
docs: drop per-plugin demo-vault setup notes (bootstrap covered by ODU harness)
This commit is contained in:
parent
431a8516c8
commit
32eb3b0cb9
4 changed files with 1 additions and 58 deletions
|
|
@ -4,7 +4,7 @@ Welcome to the [Advanced Debug Mode](https://github.com/mnaoumov/obsidian-advanc
|
|||
|
||||
> [!TIP] Interactive buttons
|
||||
>
|
||||
> Some notes have **Run** buttons, powered by [`CodeScript Toolkit`](https://github.com/mnaoumov/obsidian-codescript-toolkit/), which this vault installs for you automatically on first open (see [[CodeScript Toolkit prerequisite]]). Every button here is honest about what it does - most just throw an error on purpose so you can read the resulting stack trace in DevTools.
|
||||
> Some notes have **Run** buttons, powered by [`CodeScript Toolkit`](https://github.com/mnaoumov/obsidian-codescript-toolkit/). Every button here is honest about what it does - most just throw an error on purpose so you can read the resulting stack trace in DevTools.
|
||||
|
||||
## Features
|
||||
|
||||
|
|
@ -14,8 +14,3 @@ Welcome to the [Advanced Debug Mode](https://github.com/mnaoumov/obsidian-advanc
|
|||
- [[04 Long running tasks]]
|
||||
- [[05 More debug tools]]
|
||||
- [[06 Settings]]
|
||||
|
||||
## Setup
|
||||
|
||||
- [[Code buttons check]]
|
||||
- [[CodeScript Toolkit prerequisite]]
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-codescript-toolkit/)
|
||||
|
||||
# Code buttons check
|
||||
|
||||
If [`CodeScript Toolkit`](https://github.com/mnaoumov/obsidian-codescript-toolkit/) is installed and enabled, the block below renders as a **Run** button. Click it - a notice should appear. If you only see a code block, install the prerequisite first: [[CodeScript Toolkit prerequisite]].
|
||||
|
||||
```code-button
|
||||
---
|
||||
caption: Click me
|
||||
---
|
||||
import { Notice } from 'obsidian';
|
||||
new Notice('Code buttons work - you are ready to explore the demo vault.');
|
||||
```
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
[Docs](https://github.com/mnaoumov/obsidian-codescript-toolkit/)
|
||||
|
||||
# CodeScript Toolkit prerequisite
|
||||
|
||||
The **Run** buttons in this vault are powered by [`CodeScript Toolkit`](https://github.com/mnaoumov/obsidian-codescript-toolkit/). This vault installs and enables it for you automatically the first time you open the vault (and trust it). Nothing here is required to explore Advanced Debug Mode - the buttons just make it easy to throw a sample error and watch the enriched stack trace in DevTools.
|
||||
|
||||
## If the buttons do not work
|
||||
|
||||
If a code block does not turn into a button, install CodeScript Toolkit manually:
|
||||
|
||||
1. Open **Settings -> Community plugins -> Browse**.
|
||||
2. Search for **CodeScript Toolkit**, install it, and enable it.
|
||||
3. Reopen a note that has a **Run** button.
|
||||
|
||||
Or click the button below to install and enable it (needs an internet connection):
|
||||
|
||||
```code-button
|
||||
---
|
||||
caption: Install CodeScript Toolkit
|
||||
---
|
||||
await require('/demoSetup.ts').installAndEnable(app, 'fix-require-modules');
|
||||
```
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
import type { App } from 'obsidian';
|
||||
|
||||
import { Notice } from 'obsidian';
|
||||
import {
|
||||
enableCommunityPlugin,
|
||||
installCommunityPlugin
|
||||
} from 'obsidian-dev-utils/obsidian/community-plugins';
|
||||
|
||||
// Advanced Debug Mode enriches the DevTools console (longer stack traces, debug namespaces, relaxed
|
||||
// Timeouts), so its interactive demo is a code-button that throws an error and lets you read the enriched
|
||||
// Stack trace in DevTools - that button's code lives inline in the note. The only helper this vault needs
|
||||
// Here is the shared CodeScript Toolkit installer used by the prerequisite note's button.
|
||||
export async function installAndEnable(app: App, pluginId: string): Promise<void> {
|
||||
await installCommunityPlugin({ app, pluginId });
|
||||
await enableCommunityPlugin({ app, pluginId });
|
||||
new Notice(`Installed and enabled: ${pluginId}`);
|
||||
}
|
||||
Loading…
Reference in a new issue