DevFetch VS Code Extension
DevFetch is a Visual Studio Code extension that allows you to fetch and export Azure DevOps work items (such as User Stories, Bugs, Features, Epics, and Test Cases) directly from your Azure DevOps organization. The extension provides a user-friendly interface to select your Project, Team, Area Path, Iteration Path, and Work Item Type, and outputs detailed work item information as clean, readable text files.
Features
- Connect to your Azure DevOps organization using a Personal Access Token (PAT)
- Interactive prompts to select Project, Team, Area Path, Iteration Path, and Work Item Type
- Remembers your selections for future use via VS Code User Settings
- Access and edit your saved settings through VS Code's Settings UI with dynamic dropdowns
- Automatic updating of dependent settings when parent settings change (e.g., team or project changes)
- Fetches all work items of the selected type and exports them as individual
.txt files
- Outputs the following fields for each work item (if available):
- Work Item ID
- Title
- State
- Tags
- Customer - Description (plain text, HTML removed)
- Acceptance Criteria (plain text, HTML removed)
- Repro Steps (plain text)
- Resolved Details (plain text)
- Comments (author and text, plain) - option to include or exclude
- Linked Test Cases (for non-Test Case work items) - option to include or exclude
- Attachments (downloads all attached files)
- Work Item URL
- Enhanced HTML entity decoding - Comprehensive support for:
- Smart quotes, various space types, dashes, and hyphens
- Mathematical symbols, currency symbols, and common special characters
- Both decimal and hexadecimal numeric HTML entities
- Handles HTML in fields and outputs only clean, readable plain text
- Robust error handling and user prompts for missing or empty data
![DevFetch in action]
Requirements
- Visual Studio Code (latest recommended)
- An Azure DevOps account and a valid Personal Access Token (PAT) with work item read permissions
- Internet connection to access Azure DevOps APIs
Settings
DevFetch stores your Azure DevOps settings in VS Code User Settings for easier access and editing. You can view and edit these settings in the VS Code Settings UI:
- Open VS Code Settings (File > Preferences > Settings or press Ctrl+,)
- Search for "devfetch" to see all available settings
- Edit any of the following settings:
devfetch.orgUrl: Your Azure DevOps organization URL
devfetch.project: Your selected Azure DevOps project
devfetch.team: Your selected Azure DevOps team (use the "DevFetch: Select Team from Available Options" command instead of manually editing)
devfetch.areaPath: Your selected Area Path (dropdown will show available paths)
devfetch.iterationPath: Your selected Iteration Path (dropdown will show available paths)
devfetch.workItemType: Your selected Work Item Type (will always be prompted for when running)
devfetch.includeComments: Whether to include work item comments (will always be prompted for when running)
devfetch.includeComments: Whether to include work item comments in the output (you'll be prompted each time)
Dynamic Settings:
- When you change the project, the extension will automatically populate available teams
- When you select a team, the extension will automatically refresh area paths and iteration paths
- Use the following commands to select from available options:
- DevFetch: Select Project from Available Options
- DevFetch: Select Team from Available Options
- DevFetch: Select Area Path from Available Options
- DevFetch: Select Iteration Path from Available Options
- Available options for Area Path and Iteration Path are stored but must be selected using commands (see below)
- IDs are automatically updated when you manually change project or team names
- Work item type is always prompted for and not stored
Selection Commands:
You can use the following commands to select settings from available options:
DevFetch: Select Team from Available Options - Shows a dropdown of available teams for the selected project
DevFetch: Select Area Path from Available Options - Shows a dropdown of available area paths
DevFetch: Select Iteration Path from Available Options - Shows a dropdown of available iteration paths
The extension automatically migrates any existing settings from previous versions.
Extension Settings
This extension does not add any custom VS Code settings. All configuration is handled via interactive prompts and secure storage.
Usage
- Open a workspace folder in VS Code.
- Press
Ctrl+Shift+P and run the command: DevFetch: Fetch Work Items.
- Follow the prompts to enter your Azure DevOps PAT and select your organization, project, team, area path, iteration path, and work item type.
- Choose whether to include comments in the work item output.
- Choose whether to include related test cases (for non-test case work items).
- The extension will fetch the work items and save them as
.txt files in a folder named after the work item type in your workspace.
- The folder will open automatically in your file explorer.
The extension allows you to extract text content from Word documents (DOCX), which can be useful for documentation, reference, or content migration purposes.
- Extract text content and tables from single Word documents or an entire directory of documents
- Preview document content before extraction, including table visualization
- Choose between plain text, Markdown, or HTML output formats
- Tables are properly formatted in all output formats
- Save extracted content to a file for further use
- Process multiple documents at once with organized output
- Press
Ctrl+Shift+P and run the command: DevFetch: Extract Content from Word Document
- Choose whether you want to process a single file or a directory of Word documents
- Select the Word document or directory
- Choose your preferred output format (Plain Text, Markdown, or HTML)
- Click "Extract Content" to view the extracted content, including properly formatted tables
- Click "Save to File" to save the extracted content to disk
DevFetch: Extract Code Format from Excel - Extract code formats from Excel files
Converting Test Scenarios to Excel
This extension provides a feature to convert test scenarios in a specific format into an Excel file compatible with the format used for test case management.
How to Use:
- Open the Command Palette (
Ctrl+Shift+P)
- Run the command:
Convert Test Scenarios to Excel
- In the UI that appears:
- Paste your test scenario text or select a text file containing your scenarios
- Enter the Feature name and User Story manually (required fields)
- Click "Generate Preview" to see how your scenarios will be formatted
- Select an output directory
- Click "Export to Excel" to create the Excel file
The tool expects test scenarios in this format:
// [FEATURE] Your Feature Name
// [USER STORY] Your User Story Description
// [SCENARIO 1] First Scenario Description
// [GIVEN] Given precondition
// [WHEN] When action
// [THEN] Then expected result
// [SCENARIO 2] Second Scenario Description
// ...
The output Excel file will include:
- Feature (manually entered)
- User Story (manually entered)
- Scenario # (auto-numbered)
- Given-When-Then Tag (GIVEN/WHEN/THEN)
- Description (scenario text)
- Code Format (formatted according to the specified formula)
Reset Commands
DevFetch: Reset Stored Settings of DevFetch - Clear all stored DevFetch settings at once
DevFetch: Clear Stored Organization URL - Clear only the stored organization URL
DevFetch: Clear Stored Project - Clear the stored project and project ID
DevFetch: Clear Stored Team - Clear the stored team and team ID
DevFetch: Clear Stored Area Path - Clear the stored area path
DevFetch: Clear Stored Iteration Path - Clear the stored iteration path
These commands can be accessed by pressing Ctrl+Shift+P and typing the command name.
Resetting Settings
If you need to clear all stored Azure DevOps settings (including authentication method), use the command:
DevFetch: Reset All Settings
This will:
- Remove your stored Personal Access Token (PAT) from VS Code secrets
- Clear all DevFetch-related settings (organization URL, project, team, area path, iteration path, work item type)
- Also clear the selected authentication method (authMethod). You will be prompted to select OAuth or PAT again after reset.
Known Issues
- Only supports Azure DevOps work items. Other Azure DevOps entities are not supported.
- Requires a valid PAT with sufficient permissions.
- Large queries may take some time to complete.
Release Notes
1.0.0
- Initial release of DevFetch: fetch and export Azure DevOps work items as plain text files.
1.1.0
- Added support for additional fields and improved plain text output.
- Enhanced error handling and user experience.
This extension now includes a powerful feature to extract PR comments with code context from Azure DevOps pull requests, similar to the Python script functionality you provided.
- Code Context Display: Shows ±5 lines (configurable) around commented lines for better understanding
- Thread Analysis: Extracts thread ID, file path, iteration, and comment text
- Side Detection: Automatically detects if comments are on left (original) or right (modified) side
- Latest Iteration Focus: Uses the latest iteration's commits for consistent analysis
- File Validation: Checks if commented line numbers are valid for the file length
- Multiple Output Formats: Creates individual files per thread plus a summary file
- Diff URLs: Provides browser links to view the actual diff for each commented file
- Press
Ctrl+Shift+P and run the command: DevFetch: Fetch Pull Request Comments with Code Context
- Enter the Pull Request ID
- Optionally enter a Repository ID (defaults to project ID if not provided)
- Set the number of context lines to show (default: 5)
- Choose an output directory name
- Click "Preview" to see a sample of comments or "Extract Comments" to process all comments
The tool creates individual text files for each comment thread containing:
- Pull Request ID and Thread ID
- File path and line numbers
- Code side (left/right) information
- Code context with highlighted commented lines
- All comment text from the thread
- Direct link to view the diff
Plus a summary file with overall statistics and file listing.
Prerequisites:
- Must have organization URL and project configured (use main DevFetch command first)
- Authentication via PAT token or OAuth (same as main extension)
- Repository access permissions in Azure DevOps
XLIFF Text Replacement Tool
A powerful utility to perform deterministic text-to-text transformations on XLIFF (.xlf / .xliff) translation files.
Features
- Multiple Replacements: Provide a dictionary of
fromText -> toText pairs to replace multiple strings at once.
- Two Scope Modes:
- Targets Only (Safe): Only replaces text inside
<target> elements within <trans-unit> blocks.
- Automatically updates
state="needs-review-translation" to state="translated" when a replacement occurs.
- Exact match only: Replaces the entire content of the target if it matches the key exactly.
- Global: Replaces text occurrences everywhere in the file (source, target, notes, etc.).
- Performs standard replace-all on text nodes.
- Preview: Shows a summary of changes before applying them to the file.
- Validation: Prevents duplicate keys and ensures valid input.
Usage
- Open an XLIFF file or right-click one in the Explorer.
- Run the command:
DevFetch: Replace Text in XLIFF.
- A dedicated tool window will open.
- Select File: If not already selected, choose the XLIFF file to modify.
- Define Replacements:
- Manual Entry: Add "Text to find" and "Replacement" pairs one by one.
- Paste JSON: Paste a JSON object (e.g.,
{"Bloqué":"Blocked"}) to auto-populate pairs.
- Select Scope:
Targets Only: Safer, updates translation state.
Global: Replaces everywhere.
- Preview: Click "Generate Preview" to see a summary of potential changes.
- Apply: Click "Apply Changes" to modify the file in-place.
Author
Devendra Reddy

Enjoy using DevFetch!