Doc Detective VSCode Extension
The Doc Detective VSCode Extension integrates the Doc Detective documentation testing framework directly into your Visual Studio Code environment. This extension helps you detect, view, and manage documentation tests embedded in your content files, making it easier to keep your documentation accurate and up-to-date.
Features
- Real-time Test Detection: Automatically detects Doc Detective tests in your open files
- Sidebar Integration: View detected tests in a dedicated Doc Detective panel in the activity bar
- Interactive Test Explorer: Navigate through detected tests with collapsible sections for easy viewing
- Syntax Highlighting: Tests are displayed with proper syntax highlighting for improved readability
How It Works
Doc Detective is a documentation testing framework that helps validate documentation against real product behavior. This extension uses doc-detective-resolver
to scan your documentation files for embedded tests and displays them in the sidebar panel.
Requirements
- Visual Studio Code v1.100.0 or higher
Installation
Via VS Code Marketplace
- Open VS Code
- Go to the Extensions view (Ctrl+Shift+X)
- Search for "Doc Detective"
- Click Install
Manual Installation
If you prefer to install the extension manually:
- Download the VSIX file from the latest release
- In VS Code, go to the Extensions view (Ctrl+Shift+X)
- Click the "..." menu in the top right of the Extensions view
- Select "Install from VSIX..." and choose the downloaded file
Using Doc Detective Extension
- Open a file that contains Doc Detective tests or inline test steps
- Click the Doc Detective icon in the activity bar
- Review the detected tests in your document
The extension will automatically scan open files for:
- Inline tests using HTML comments or markdown comment syntax
- Test specifications in YAML or JSON format
- Documentation with embedded test steps
Configuration
Config Path
You can specify a custom path to your Doc Detective configuration file using the docDetective.configPath
setting:
- Open VS Code Settings (File > Preferences > Settings)
- Search for "Doc Detective"
- Set the "Config Path" field to your configuration file path
The path can be:
- Absolute path: Full path to your config file (e.g.,
/home/user/my-project/.doc-detective.json
)
- Relative path: Path relative to your workspace root (e.g.,
config/.doc-detective.yaml
)
If no custom path is specified, the extension automatically searches for these files in your workspace root:
.doc-detective.json
.doc-detective.yaml
.doc-detective.yml
The configuration file can be in JSON or YAML format and follows the Doc Detective configuration schema.
Doc Detective has multiple components that work together:
Learn More
Contributing
Interested in contributing to this extension? Check out the Doc Detective GitHub organization to learn more about the project and how to get involved.
Made with ❤️ by the Doc Detective team