microsoft / microsoft/vscode-python-debugger

NumPy array metadata (shape, dtype, ndim)

未关闭
#987 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
TypeScript
星标
180
派生
126
平均合并
2 天 3 小时
30 天内合并 PR
3

描述

Type: Feature Request

Hello VS Code team,

Feature request: please add an option to show NumPy array metadata (shape, dtype, ndim) directly in the Variables/Locals view when debugging Python. Current workarounds (Data Viewer, Watch, Debug Console) are helpful but a compact shape/dtype column would greatly speed up debugging numeric code.

Use case:

  • Quickly inspect array shapes/dtypes (e.g., frame.shape, frame.dtype) while paused at breakpoints without opening the Data Viewer or adding watches.
  • Helpful for image-processing / ML workflows where many arrays are inspected frequently.

Suggested design:

  • Add optional compact badges or columns in Variables: name | type | shape | dtype | value-preview.
  • Or provide a toggle Python: Show Array Shape/DType in Variables.

Repro steps:

  1. Open a Python file using NumPy arrays.
  2. Start debugger and pause on a line where arrays exist.
  3. Observe Variables view — shape/dtype not visible by default.

Environment:

  • VS Code version: 1.109.4
  • Python extension: 2026.2.0
  • OS: linux

Thanks for considering.

Regards,
Uri ZACKHEM urizackhem@gmail.com

VS Code version: Code 1.109.4 (c3a26841a84f20dfe0850d0a5a9bd01da4f003ea, 2026-02-16T15:35:57.932Z)
OS version: Linux x64 6.17.0-14-generic snap
Modes:

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先定位 TypeScript 调试器扩展中 Variables/Locals 的渲染入口,并查看暂停时 Python 值的表示方式。确定可以在哪里暴露 NumPy 的 shape、dtype 和 ndim,以及可选显示应如何工作;完成的标准是:暂停时无需 Data Viewer 或 watches 即可看到所请求的元数据。

由索引模型根据 Issue 内容生成。

评估

技术栈
numpy, python, typescript
领域
developer-experience, devtools
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
基本清楚
新手友好度
30/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。