Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Elasticsearch DevTools & SupportNew to Visual Studio Code? Get it now.
Elasticsearch DevTools & Support

Elasticsearch DevTools & Support

Data Ops Pulse

|
15 installs
| (3) | Free
Elasticsearch client like Kibana DevTools for VS Code, supercharged with everything a builder and maintainer needs.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Supercharged Elasticsearch Tools for VS Code

For engineers building with Elasticsearch; or looking for easier way to maintain Elasticsearch in production.

This extension for VSCode brings a supercharged Kibana DevTools-like functionality directly into your editor, along with advanced query and index mapping editing, mock-data generator, snippets, and more.

Fully supporting all modern Elasticsearch versions, running anywhere (Elastic Cloud and self-managed), with smart configuration management and Cloud ID support.

Elasticsearch DevTools Interface

🚀 What's Inside?

🛠️ Kibana DevTools-like Interface

  • Query and commands execution for .es.http files
  • Interactive request/response panels, exactly like you had in Sense and Kibana DevTools.
  • Syntax highlighting and auto-completion.
  • Smart configuration warnings for unconfigured connections
  • Keyboard shortcuts: Ctrl+Enter to execute, Enter in path field
  • Optional Tabular Data Viewer for _cat APIs and search results.
  • Copy as cURL option.
  • Stream files into requests in .es.http requests using < or @ operators instead of copy-pasting them.

Example usage:

POST my_index/_search
< ./queries/search-users.es.query

PUT my_index/_mapping
@ ./mappings/user-mapping.es.mapping

🔍 Advanced Query Editor

  • Smart completion for *.es.query and *.es.query.json files with Elasticsearch queries
  • IntelliSense for queries, aggregations, and field types
  • Quick actions: Wrap selections in bool clauses (filter, should, must_not)

🗺️ Index Mapping Editor

  • Comprehensive mapping validation for *.es.mapping.json and *.es.json files
  • Best practices recommendations and warnings
  • Field type validation
  • Performance impact analysis

🎲 Mock Data Generator

  • Generate realistic test data from index mappings
  • Support for all Elasticsearch field types
  • Configurable document count and data patterns
  • Command Palette integration and context menu access

More Coming Soon

📦 Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Elasticsearch DevTools"
  4. Click Install

🎯 Quick Start

1. Configure Elasticsearch Connection (optional)

If you want to use DevTools, you'd need to set up a connection to a cluster. This extension supports only one connection at a time.

# Open Command Palette (Ctrl+Shift+P)
> Elasticsearch: Configure Connection

The configuration dialog will open with the following options:

  • Hosts: Enter one or more Elasticsearch hosts with protocol (e.g., http://localhost:9200, https://es-node1:9200)
  • Port: Default Elasticsearch port (optional if specified in hosts)
  • Username: Username for authentication (optional)
  • Password: Password for authentication (optional)
  • Cloud ID: Elastic Cloud deployment ID (overrides hosts/port when specified)

Note: If no configuration is set, a warning banner will appear in .es.http files prompting you to configure your connection.

2. Create Your First Query File

DevTools-style HTTP queries (.es.http)

GET /_cluster/health

POST /my-index/_search
{
  "query": {
    "match_all": {}
  },
  "size": 10
}

Elasticsearch query files (.es.query.json or .es.query)

{
  "query": {
    ...
  }
}

Index mappings (.es.mapping.json)

{
  "properties": {
    "title": {
      "type": "text",
      "analyzer": "standard"
    },
    "price": {
      "type": "scaled_float",
      "scaling_factor": 100
    }
  }
}

⌨️ Keyboard Shortcuts

Shortcut Action Context
Cmd/Ctrl+Enter Execute Query .es.http, .es.query.json files
Cmd/Ctrl+Shift+F Format Query .es.query.json files
Cmd/Ctrl+Shift+D Open DevTools Panel Global

🎛️ Commands

Command Description Context
Elasticsearch: Configure Connection Open configuration dialog Global
Elasticsearch: Execute Query Execute current query .es.http, .es.query.json files
Elasticsearch: Format Query Format JSON query .es.query.json files
Elasticsearch: Wrap in Bool Filter Wrap selection in bool filter clause .es.query.json files
Elasticsearch: Wrap in Bool Should Wrap selection in bool should clause .es.query.json files
Elasticsearch: Wrap in Bool Must Not Wrap selection in bool must_not clause .es.query.json files
Elasticsearch: Open Elasticsearch DevTools Open DevTools panel Global
Elasticsearch: Generate Mock Data from Mapping Generate realistic test data from mapping .es.mapping.json files

🎨 File Types & Features

.es.http - DevTools HTTP Files

  • Purpose: Kibana DevTools-like interface for HTTP requests
  • Features:
    • HTTP method support (GET, POST, PUT, DELETE)
    • Auto-completion for Elasticsearch API endpoints
    • Cluster management operations (health, stats, nodes)
    • Index operations (CRUD, mappings, settings)
    • Advanced features (ILM, snapshots, security, watchers)
  • Snippets: 80+ snippets for all ES operations (es-get-health, es-put-ilm-policy)
  • Usage: DevTools-style queries with request/response separation

.es.query.json - Elasticsearch Query Files

  • Purpose: Valid JSON files for Elasticsearch queries and aggregations
  • Features:
    • Full IntelliSense with query and aggregation completion
    • Query validation and JSON formatting
    • Bool query wrapping shortcuts (filter, should, must_not)
    • Real-time syntax validation
  • Snippets: 50+ query and aggregation snippets (es-match, es-bool, es-agg-terms)
  • Usage: Pure JSON query development with execution support

.es.mapping.json - Index Mapping Files

  • Purpose: Valid JSON files for Elasticsearch index mappings
  • Features:
    • Comprehensive mapping validation
    • Field type checking and recommendations
    • Best practices analysis
    • Mock data generation from mappings (Command Palette or right-click context menu)
  • Snippets: 30+ field type and mapping snippets (es-field-text, es-mapping-complete)
  • Usage: Index mapping design and validation

🎯 Use Cases

Development Workflow

  1. Design mappings using .es.mapping.json files with validation
  2. Generate mock data from mappings for testing
  3. Develop queries using .es.query.json files with IntelliSense
  4. Test APIs using .es.http files in DevTools style
  5. Explore data using the tabular data viewer

Query Development

  • Build complex bool queries with easy wrapping shortcuts
  • Test aggregations with auto-completion
  • Format and validate queries before deployment
  • Export results for analysis

Data Exploration

  • Browse index data in tabular format
  • Search and filter documents
  • Examine index mappings and settings
  • Generate sample data for development

🐛 Troubleshooting

Common Issues

Connection Refused

  • Verify Elasticsearch is running
  • Check hosts configuration in settings
  • Ensure SSL certificates are valid
  • Verify authentication credentials if required

Configuration Warning Banner Appears

  • Open Command Palette and run "Elasticsearch: Configure Connection"
  • Add your Elasticsearch hosts or Cloud ID
  • Ensure at least one non-default host is configured

Queries Not Executing

  • Check Elasticsearch configuration in settings
  • Verify hosts are accessible and authentication is correct
  • Check query syntax and formatting
  • Verify index names exist

IntelliSense Not Working

  • Ensure file has correct extension (.es.query.json, .es.http)
  • Reload VS Code window
  • Check extension is enabled

Cloud ID Issues

  • Verify Cloud ID format: deployment-name:base64-encoded-data
  • Check that Cloud ID is properly decoded
  • Ensure authentication credentials are correct for Cloud deployment

Mock Data Generation Fails

  • Validate mapping JSON syntax
  • Check for unsupported field types
  • Ensure reasonable document count (<10,000)

Debug Mode

Enable debug logging:

{
  "elasticsearch.debug": true
}

View logs in:

  • Output Panel: "Elasticsearch Query Results"
  • Developer Tools: Help > Toggle Developer Tools

🔗 Links

  • Elasticsearch Documentation
  • Elasticsearch Documentation and Guides
  • Elasticsearch Support

Happy searching! 🔍✨

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft