Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Index of ArrayNew to Visual Studio Code? Get it now.
Index of Array

Index of Array

mahdi bin iqbal

| (0) | Free
Hover any C/C++ or Python array, vector, list, tuple, set, dict or string to see its elements with indices and shape.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Index of Array icon

Index of Array

License: MIT GitHub VS Code

A VS Code extension that shows the contents of an array with its indices when you hover over a variable in a C, C++ or Python file.

What it shows

  • 1D arrays — every element with its index, e.g. [0] = 10 [1] = 20 [2] = 30
  • 2D arrays — a table with row index [i] and column index [j]
  • 3D arrays — one table per outer layer, with [j] / [k] indices
  • Strings — every character with its index
  • Python dicts — key/value table
  • Shape information — e.g. 2D · shape 3 × 4 · 12 elements
  • Declared-only arrays — if an array has no literal initializer (values are filled at runtime), the declared shape is shown instead.

Array Inspector panel

The hover shows all elements with their indices. At the top of the hover, click more to open the full designed view in a side panel:

  • click more in the hover, or
  • press Ctrl+Alt+A (Cmd+Alt+A on macOS) with the cursor on an array variable, or
  • right-click the variable → Index of Array: Open Array Inspector.

The panel includes a shape header, a responsive grid for 1D arrays, sticky row/column headers for 2D and 3D arrays, a filter box for large arrays, and click-to-copy of any cell's expression (arr[2], arr[1][0]).

Supported languages

Language Types
C / C++ raw arrays (int a[] = {...}), std::vector, std::array, std::string, char* / char[] strings, nested initializer lists
Python list, tuple, set, dict, str

How to build

npm install
npm run compile

How to run (development)

  1. Open the indexOfArray folder in VS Code.
  2. Press F5 (or Run → Start Debugging). This opens an Extension Development Host window.
  3. In that new window open any .c, .cpp or .py file (for example examples/demo.cpp or examples/demo.py).
  4. Hover over an array variable name and the popup will show the indexed contents.

How to package

npm install -g @vscode/vsce
vsce package

Then install the generated .vsix with Extensions → … → Install from VSIX.

Limitations

  • Values are read from literal initializers in the source code. If an array is filled at runtime (loops, input, function calls), only its declared shape can be shown.
  • A variable is resolved inside the current document only.
  • Very large arrays are shown in full inside the Array Inspector panel; the hover shows a compact preview.

Creator

Mahdi Bin Iqbal — @mahadihasan9

Software Developer · Python, C/C++, Kotlin, backends & automation tools · Cybersecurity enthusiast.

  • GitHub: github.com/mahadihasan9
  • Website: mahdi-bin-iqbal.netlify.app
  • Email: islammdmahadi942@gmail.com
  • Location: Dhaka, Bangladesh

License

Released under the MIT License.

Copyright © 2026 Mahdi Bin Iqbal.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft